diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 05:45:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 05:45:03 +0000 |
commit | e0f2d1f0178f684eb371efb02dd6b0b491340dbd (patch) | |
tree | e11503905ae48ca0991ec4c6d093d96c1867c585 /debian/patches/05-hurd-port.diff | |
parent | Adding upstream version 1.3.4+ds. (diff) | |
download | libtirpc-e0f2d1f0178f684eb371efb02dd6b0b491340dbd.tar.xz libtirpc-e0f2d1f0178f684eb371efb02dd6b0b491340dbd.zip |
Adding debian version 1.3.4+ds-1.debian/1.3.4+ds-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/05-hurd-port.diff')
-rw-r--r-- | debian/patches/05-hurd-port.diff | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/debian/patches/05-hurd-port.diff b/debian/patches/05-hurd-port.diff new file mode 100644 index 0000000..c7bc746 --- /dev/null +++ b/debian/patches/05-hurd-port.diff @@ -0,0 +1,79 @@ +Description: Get source building on Hurd + - Look for <sys/user.h> before using it. + - Define MAXHOSTNAMELEN to 64 if missing. + - Bind sockets on Hurd like on Linux. +Author: Petter Reinholdtsen <pere@hungry.com> +Forwarded: not-needed +Last-Update: 2022-08-11 + + +--- a/src/auth_unix.c ++++ b/src/auth_unix.c +@@ -56,6 +56,11 @@ + #include <rpc/auth.h> + #include <rpc/auth_unix.h> + ++/* Workaround for Hurd */ ++#ifndef MAXHOSTNAMELEN ++# define MAXHOSTNAMELEN 64 ++#endif ++ + /* auth_unix.c */ + static void authunix_nextverf (AUTH *); + static bool_t authunix_marshal (AUTH *, XDR *); +--- a/src/bindresvport.c ++++ b/src/bindresvport.c +@@ -64,7 +64,7 @@ + return bindresvport_sa(sd, (struct sockaddr *)sin); + } + +-#ifdef __linux__ ++#if defined(__linux__) || defined(__GNU__) + + #define STARTPORT 600 + #define LOWPORT 512 +--- a/src/getpeereid.c ++++ b/src/getpeereid.c +@@ -25,10 +25,14 @@ + */ + + ++#include "config.h" ++ + #include <sys/param.h> + #include <sys/socket.h> + #include <sys/un.h> +-#include <sys/user.h> ++#ifdef HAVE_SYS_USER_H ++# include <sys/user.h> ++#endif /* HAVE_SYS_USER_H */ + + #include <errno.h> + #include <unistd.h> +@@ -36,6 +40,9 @@ + int + getpeereid(int s, uid_t *euid, gid_t *egid) + { ++#ifndef HAVE_SYS_USER_H ++ return(-1); ++#else + #ifdef XUCRED_VERSION + struct xucred uc; + #define uid cr_uid +@@ -59,4 +66,5 @@ + *euid = uc.uid; + *egid = uc.gid; + return (0); ++#endif /* HAVE_SYS_USER_H */ + } +--- a/configure.ac ++++ b/configure.ac +@@ -93,7 +93,7 @@ + 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/param.h sys/socket.h sys/time.h syslog.h unistd.h features.h gssapi/gssapi_ext.h sys/user.h]) + AX_PTHREAD + AC_CHECK_FUNCS([getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent]) + |