util: Enable m5term Apple Mac OS Compilation (#1046)

The "linux/limits.h" equivalent on Apple systems is "sys/syslimits.h".
By adding an include guard to include the correct header dependent on
the host system, we can compile m5term on Mac OS systems.
This commit is contained in:
Bobby R. Bruce
2024-04-22 11:31:16 -07:00
committed by GitHub
parent dd2689905f
commit 40fdf368d8

View File

@@ -32,7 +32,11 @@
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <libgen.h> #include <libgen.h>
#include <linux/limits.h> #ifdef __APPLE__
#include <sys/syslimits.h>
#else
#include <linux/limits.h>
#endif
#include <netdb.h> #include <netdb.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <poll.h> #include <poll.h>