diff --git a/FL/fl_attr.h b/FL/fl_attr.h index 52b350754..46d4cb793 100644 --- a/FL/fl_attr.h +++ b/FL/fl_attr.h @@ -1,7 +1,7 @@ /* * Function attribute declarations for the Fast Light Tool Kit (FLTK). * - * Copyright 1998-2023 by Bill Spitzak and others. + * Copyright 1998-2024 by Bill Spitzak and others. * * This library is free software. Distribution and use rights are outlined in * the file "COPYING" which should have been included with this file. If this @@ -168,11 +168,11 @@ #endif #endif /* gcc 4.5.0 */ -#if FL_GCC_VERSION > 30100 /* gcc 3.1.0 */ +#if FL_GCC_VERSION >= 30400 /* gcc 3.4.0 */ #ifndef FL_DEPRECATED #define FL_DEPRECATED(msg, func) func __attribute__((deprecated)) #endif -#endif /* gcc 3.1.0 */ +#endif /* gcc 3.4.0 */ #endif /* __GNUC__ */ diff --git a/src/drivers/Unix/Fl_Unix_Screen_Driver.H b/src/drivers/Unix/Fl_Unix_Screen_Driver.H index c0d0356a1..2b8a5a7ab 100644 --- a/src/drivers/Unix/Fl_Unix_Screen_Driver.H +++ b/src/drivers/Unix/Fl_Unix_Screen_Driver.H @@ -31,6 +31,18 @@ static pollfd *pollfds = 0; # include # endif /* HAVE_SYS_SELECT_H */ +// NetBSD before version 3.0 declares select() in "unistd.h" (#944): +// https://man.netbsd.org/NetBSD-2.1/select.2 + +# if defined(__NetBSD__) +# include // For '__NetBSD_Version__' definition +# if defined(__NetBSD_Version__) && (__NetBSD_Version__ < 300000000) +# include +# include +# include +# endif // __NetBSD_Version__ +# endif // __NetBSD__ + # define POLLIN 1 # define POLLOUT 4 # define POLLERR 8