diff options
author | Arvind Sankar <[email protected]> | 2020-06-11 16:25:39 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-06-18 12:21:25 -0700 |
commit | 60356b1a211a0fcfe7dbd2e1dd280d6fc0170cf0 (patch) | |
tree | ca3cd9430efffadd0f1a98994c3d864ce16076b0 /lib/libspl | |
parent | c3fe42aabd9f8879500437e2be2968b47e8b6797 (diff) |
Add include files for prototypes
Include the header with prototypes in the file that provides definitions
as well, to catch any mismatch between prototype and definition.
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Arvind Sankar <[email protected]>
Closes #10470
Diffstat (limited to 'lib/libspl')
-rw-r--r-- | lib/libspl/os/freebsd/getexecname.c | 11 | ||||
-rw-r--r-- | lib/libspl/os/linux/getexecname.c | 5 |
2 files changed, 9 insertions, 7 deletions
diff --git a/lib/libspl/os/freebsd/getexecname.c b/lib/libspl/os/freebsd/getexecname.c index 13e50d324..2b057cc73 100644 --- a/lib/libspl/os/freebsd/getexecname.c +++ b/lib/libspl/os/freebsd/getexecname.c @@ -21,14 +21,15 @@ */ -#include <string.h> -#include <unistd.h> -#include <pthread.h> +#include <errno.h> #include <limits.h> +#include <pthread.h> +#include <stdlib.h> +#include <string.h> #include <sys/param.h> -#include <sys/types.h> #include <sys/sysctl.h> -#include <errno.h> +#include <sys/types.h> +#include <unistd.h> const char * getexecname(void) diff --git a/lib/libspl/os/linux/getexecname.c b/lib/libspl/os/linux/getexecname.c index c21a110ad..6352a1a34 100644 --- a/lib/libspl/os/linux/getexecname.c +++ b/lib/libspl/os/linux/getexecname.c @@ -25,10 +25,11 @@ */ +#include <limits.h> +#include <pthread.h> +#include <stdlib.h> #include <string.h> #include <unistd.h> -#include <pthread.h> -#include <limits.h> const char * getexecname(void) |