@@ -85,7 +85,7 @@ AC_CONFIG_HEADERS([config.h])
AC_PROG_LIBTOOL
AC_HEADER_DIRENT
AC_PREFIX_DEFAULT(/usr)
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h features.h gssapi/gssapi_ext.h])
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h syslog.h unistd.h features.h gssapi/gssapi_ext.h])
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_FUNCS([getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent])
@@ -40,7 +40,6 @@
*/
#include <pthread.h>
#include <reentrant.h>
-#include <sys/param.h>
#include <assert.h>
#include <err.h>
@@ -49,6 +48,7 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
+#include <limits.h>
#include <rpc/clnt.h>
#include <rpc/types.h>
@@ -183,7 +183,7 @@ AUTH *
authunix_create_default()
{
int len;
- char machname[MAXHOSTNAMELEN + 1];
+ char machname[HOST_NAME_MAX + 1];
uid_t uid;
gid_t gid, *gids;
AUTH *result;
@@ -36,7 +36,6 @@
*/
#include <pthread.h>
#include <reentrant.h>
-#include <sys/param.h>
#include <stdio.h>
#include <errno.h>
#include <rpc/rpc.h>
@@ -25,7 +25,6 @@
*/
-#include <sys/param.h>
#include <sys/socket.h>
#include <sys/un.h>
@@ -34,7 +34,6 @@
* the sun NIS domain architecture.
*/
-#include <sys/param.h>
#include <rpc/rpc.h>
#include "rpc_com.h"
#ifdef YP
@@ -32,7 +32,6 @@
* will work with any unix system that has adopted the sun NIS domain
* architecture.
*/
-#include <sys/param.h>
#include <rpc/rpc.h>
#include "rpc_com.h"
#ifdef YP
@@ -37,7 +37,6 @@
#include <pthread.h>
#include <reentrant.h>
#include <sys/types.h>
-#include <sys/param.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/un.h>
@@ -39,8 +39,6 @@
* routines are also in this program.
*/
-#include <sys/param.h>
-
#include <assert.h>
#include <rpc/rpc.h>
@@ -46,12 +46,12 @@
*/
#include <pthread.h>
#include <reentrant.h>
+#include <limits.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <rpc/des_crypt.h>
-#include <sys/param.h>
#include <netinet/in.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
@@ -445,7 +445,7 @@ struct bsdcred {
short uid; /* cached uid */
short gid; /* cached gid */
short grouplen; /* length of cached groups */
- short groups[NGROUPS]; /* cached groups */
+ short groups[NGROUPS_MAX]; /* cached groups */
};
/*
@@ -39,7 +39,6 @@
#include <reentrant.h>
#include <sys/socket.h>
#include <sys/types.h>
-#include <sys/param.h>
#include <poll.h>
#include <sys/un.h>
#include <sys/time.h>
@@ -39,7 +39,6 @@
*/
#include <sys/types.h>
-#include <sys/param.h>
#include <stdio.h>
@@ -66,7 +66,6 @@ typedef int32_t rpc_inline_t;
#define mem_free(ptr, bsize) free(ptr)
#include <sys/time.h>
-#include <sys/param.h>
#include <stdlib.h>
#include <netconfig.h>
The header <sys/param.h> is of BSD origin and is mainly used for system limit constants such as MAXHOSTNAMELEN. Remove unecessary inclusions of <sys/param.h> and replace limit constants by equivalent POSIX constants from <limits.h>. Signed-off-by: Felix Janda <felix.janda@posteo.de> --- configure.ac | 2 +- src/auth_unix.c | 4 ++-- src/clnt_simple.c | 1 - src/getpeereid.c | 1 - src/netname.c | 1 - src/netnamer.c | 1 - src/rpc_generic.c | 1 - src/rpc_prot.c | 2 -- src/svc_auth_des.c | 4 ++-- src/svc_vc.c | 1 - src/xdr_float.c | 1 - tirpc/rpc/types.h | 1 - 12 files changed, 5 insertions(+), 15 deletions(-)