X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=serialport.c;h=2c1b68217eaf0747d93761fc5af61a6accaa45c4;hb=bd0fb6094f3b3cf7368bb17b09e30dd3408f9eae;hp=6875fe1abce32bf8248eed326f9f200a70d75e64;hpb=7fb9a7b0a72bea83d05ef19e09e6b95b066b523d;p=libserialport.git diff --git a/serialport.c b/serialport.c index 6875fe1..2c1b682 100644 --- a/serialport.c +++ b/serialport.c @@ -49,14 +49,13 @@ static const struct std_baudrate std_baudrates[] = { void (*sp_debug_handler)(const char *format, ...) = sp_default_debug_handler; -static void get_time(struct timeval *time); - static enum sp_return get_config(struct sp_port *port, struct port_data *data, struct sp_port_config *config); static enum sp_return set_config(struct sp_port *port, struct port_data *data, const struct sp_port_config *config); +#ifndef _WIN32 static void get_time(struct timeval *time) { #ifdef HAVE_CLOCK_GETTIME @@ -76,6 +75,7 @@ static void get_time(struct timeval *time) gettimeofday(time, NULL); #endif } +#endif SP_API enum sp_return sp_get_port_by_name(const char *portname, struct sp_port **port_ptr) {