diff --git a/SheepShaver/src/Unix/prefs_editor_gtk.cpp b/SheepShaver/src/Unix/prefs_editor_gtk.cpp index aa5962c8..0641d556 100644 --- a/SheepShaver/src/Unix/prefs_editor_gtk.cpp +++ b/SheepShaver/src/Unix/prefs_editor_gtk.cpp @@ -815,7 +815,17 @@ static GList *add_serial_names(void) if (d) { struct dirent *de; while ((de = readdir(d)) != NULL) { +#if defined(__linux__) if (strncmp(de->d_name, "ttyS", 4) == 0 || strncmp(de->d_name, "lp", 2) == 0) { +#elif defined(__FreeBSD__) + if (strncmp(de->d_name, "cuaa", 4) == 0 || strncmp(de->d_name, "lpt", 3) == 0) { +#elif defined(__NetBSD__) + if (strncmp(de->d_name, "tty0", 4) == 0 || strncmp(de->d_name, "lpt", 3) == 0) { +#elif defined(sgi) + if (strncmp(de->d_name, "ttyf", 4) == 0 || strncmp(de->d_name, "plp", 3) == 0) { +#else + if (false) { +#endif char *str = new char[64]; sprintf(str, "/dev/%s", de->d_name); glist = g_list_append(glist, str); @@ -846,7 +856,13 @@ static GList *add_ether_names(void) struct ifreq req, *ifr = ifc.ifc_req; for (int i=0; iifr_name, 63); glist = g_list_append(glist, str); diff --git a/SheepShaver/src/Unix/sysdeps.h b/SheepShaver/src/Unix/sysdeps.h index 9d52661e..517cb234 100644 --- a/SheepShaver/src/Unix/sysdeps.h +++ b/SheepShaver/src/Unix/sysdeps.h @@ -44,6 +44,10 @@ #include #include +#ifdef HAVE_PTHREADS +# include +#endif + #ifdef HAVE_FCNTL_H # include #endif @@ -356,8 +360,10 @@ typedef struct timeval tm_time_t; extern uint64 GetTicks_usec(void); extern void Delay_usec(uint32 usec); +#ifdef HAVE_PTHREADS // Setup pthread attributes extern void Set_pthread_attr(pthread_attr_t *attr, int priority); +#endif // Various definitions typedef struct rgb_color {