Skip to content

Commit a01a081

Browse files
nunojsadNechita
authored andcommitted
dialogs: fix compilation when serial is not available
In commit 8d4b9f0 ("dialogs: improve serial handling"), we dropped the '#ifdef' but that will break compilation in case libserial is not installed as it's used functions won't be available. Fix it by reintroduced the defined set by cmake. Signed-off-by: Nuno Sa <[email protected]>
1 parent 55b6470 commit a01a081

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: dialogs.c

+2
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,7 @@ static void refresh_scan_ctx(void)
587587

588588
static void refresh_serial(GtkBuilder *builder)
589589
{
590+
#ifdef SERIAL_BACKEND
590591
GtkListStore *liststore;
591592
struct sp_port **ports;
592593
int i, active = 0;
@@ -620,6 +621,7 @@ static void refresh_serial(GtkBuilder *builder)
620621
gtk_widget_set_sensitive(dialogs.connect_serial, false);
621622
gtk_widget_set_sensitive(dialogs.connect_serialbits, false);
622623
}
624+
#endif
623625
}
624626

625627
char * usb_get_serialnumber(struct iio_context *context)

0 commit comments

Comments
 (0)