Skip to content

Commit f2bb704

Browse files
committed
Include <limits.h> instead of <sys/param.h>
Do not include <sys/param.h> unnecessarily as it includes <signal.h>. * pathtrace.c: Include <limits.h> instead of <sys/param.h>. * strace.c: Likewise. * syscall.c: Likewise. * util.c: Likewise. * tests/getcwd.c: Likewise. * tests/group_req.c: Likewise. * tests/inode_of_sockfd.c: Likewise. * tests/ip_mreq.c: Likewise. * tests/printpath-umovestr.c: Likewise. * tests/qual_fault.c: Likewise. * tests/test_printpath.c: Likewise. * tests/umovestr3.c: Likewise. * tests/net-y-unix.c: Do not include <sys/param.h>. * tests/net-yy-unix.c: Likewise.
1 parent 971df25 commit f2bb704

File tree

14 files changed

+12
-14
lines changed

14 files changed

+12
-14
lines changed

pathtrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*/
2929

3030
#include "defs.h"
31-
#include <sys/param.h>
31+
#include <limits.h>
3232
#include <poll.h>
3333

3434
#include "syscall.h"

strace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#include "defs.h"
3333
#include <stdarg.h>
34-
#include <sys/param.h>
34+
#include <limits.h>
3535
#include <fcntl.h>
3636
#include <signal.h>
3737
#include <sys/resource.h>

syscall.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include "native_defs.h"
3737
#include "nsig.h"
3838
#include "number_set.h"
39-
#include <sys/param.h>
39+
#include <limits.h>
4040

4141
/* for struct iovec */
4242
#include <sys/uio.h>

tests/getcwd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
#ifdef __NR_getcwd
66

7+
# include <limits.h>
78
# include <stdio.h>
89
# include <unistd.h>
9-
# include <sys/param.h>
1010

1111
int
1212
main(void)

tests/group_req.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333

3434
#if defined MCAST_JOIN_GROUP && defined MCAST_LEAVE_GROUP
3535

36+
# include <limits.h>
3637
# include <stdio.h>
3738
# include <unistd.h>
38-
# include <sys/param.h>
3939
# include <sys/socket.h>
4040
# include <arpa/inet.h>
4141

tests/inode_of_sockfd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929

3030
#include "tests.h"
3131
#include <assert.h>
32+
#include <limits.h>
3233
#include <stdio.h>
3334
#include <stdlib.h>
3435
#include <string.h>
3536
#include <unistd.h>
36-
#include <sys/param.h>
3737

3838
unsigned long
3939
inode_of_sockfd(const int fd)

tests/ip_mreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
#if defined IP_ADD_MEMBERSHIP && defined IPV6_ADD_MEMBERSHIP \
3333
&& defined IPV6_JOIN_ANYCAST
3434

35+
# include <limits.h>
3536
# include <stdio.h>
3637
# include <unistd.h>
37-
# include <sys/param.h>
3838
# include <sys/socket.h>
3939
# include <arpa/inet.h>
4040
# include <net/if.h>

tests/net-y-unix.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#include <stdlib.h>
3535
#include <string.h>
3636
#include <unistd.h>
37-
#include <sys/param.h>
3837
#include <sys/socket.h>
3938
#include <sys/un.h>
4039

tests/net-yy-unix.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#include <stdlib.h>
3535
#include <string.h>
3636
#include <unistd.h>
37-
#include <sys/param.h>
3837
#include <sys/socket.h>
3938
#include <sys/un.h>
4039

tests/printpath-umovestr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929

3030
#include "tests.h"
3131
#include "test_ucopy.h"
32+
#include <limits.h>
3233
#include <stdio.h>
33-
#include <sys/param.h>
3434

3535
int
3636
main(void)

0 commit comments

Comments
 (0)