Conditionally include <linux/limits.h> and <sys/params.h> on Linux, BSD
<linux/limits.h> should be included conditionally for Linux only, also SPECNAMELEN used conditionally when the OS is FreeBSD requires to include <sys/params.h>. Signed-off-by: Eleni Maria Stea <elene.mst@gmail.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>main
parent
8bc56fe0fb
commit
f287d1990b
|
@ -37,7 +37,12 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#ifdef __linux__
|
||||||
#include <linux/limits.h>
|
#include <linux/limits.h>
|
||||||
|
#elif __FreeBSD__
|
||||||
|
/* SPECNAMELEN in FreeBSD is defined here: */
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
#ifdef MAJOR_IN_MKDEV
|
#ifdef MAJOR_IN_MKDEV
|
||||||
#include <sys/mkdev.h>
|
#include <sys/mkdev.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue