MSYS2-packages/libtirpc/1.3.6-cygwin-bindresvport.patch
Christoph Reiter c53aee4bf4
libtirpc: Update to 1.3.6 (#5402)
sync patches with cygwin
2025-05-20 08:09:32 +02:00

50 lines
1.8 KiB
Diff

--- origsrc/libtirpc-1.3.6/configure.ac 2025-01-04 07:40:56.946598800 +0100
+++ configure.ac 2025-01-07 08:07:56.571653800 +0100
@@ -162,16 +162,13 @@ AC_CONFIG_HEADERS([config.h])
LT_INIT
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 endian.h machine/endian.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 endian.h machine/endian.h])
AX_PTHREAD
-AC_CHECK_FUNCS([getpeereid getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent])
+AC_CHECK_FUNCS([bindresvport getpeereid getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent])
-AC_CHECK_TYPES(struct rpcent,,, [
+AC_CHECK_TYPES([struct rpcent],,, [
#include <netdb.h>])
-AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
+AC_CONFIG_FILES([Makefile tirpc/Makefile src/Makefile man/Makefile doc/Makefile])
AC_CONFIG_FILES([libtirpc.pc])
AC_OUTPUT
--- origsrc/libtirpc-1.3.6/src/bindresvport.c 2024-10-17 09:50:55.000000000 +0200
+++ src/bindresvport.c 2025-01-04 08:04:11.718558400 +0100
@@ -33,6 +33,10 @@
* Portions Copyright(C) 1996, Jason Downs. All rights reserved.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <sys/types.h>
#include <sys/socket.h>
@@ -51,6 +55,7 @@
#include <string.h>
#include <reentrant.h>
+#if !HAVE_BINDRESVPORT
extern pthread_mutex_t port_lock;
/*
@@ -336,3 +341,4 @@ bindresvport_sa(sd, sa)
return (error);
}
#endif
+#endif /* !HAVE_BINDRESVPORT */