]> sigrok.org Git - libsigrok.git/blobdiff - src/serial.c
serial: prepare for the absence of libserialport
[libsigrok.git] / src / serial.c
index dc6e0126eefa164b67f57061d83e420c35f67df5..aca99d9988b725830a9251472231341be54c626c 100644 (file)
@@ -25,7 +25,9 @@
 #include <stdlib.h>
 #include <glib.h>
 #include <glib/gstdio.h>
+#ifdef HAVE_LIBSERIALPORT
 #include <libserialport.h>
+#endif
 #include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 #ifdef _WIN32
@@ -50,6 +52,8 @@
  * @{
  */
 
+#ifdef HAVE_SERIAL_COMM
+
 /* See if a (assumed opened) serial port is of any supported type. */
 static int dev_is_supported(struct sr_serial_dev_inst *serial)
 {
@@ -870,4 +874,10 @@ SR_PRIV int serial_timeout(struct sr_serial_dev_inst *port, int num_bytes)
        return timeout_ms;
 }
 
+#else
+
+/* TODO Put fallback.c content here? */
+
+#endif
+
 /** @} */