Files
MSYS2-packages/libtirpc/1.0.2-cygwin-bindresvport.patch
2018-10-31 09:44:14 +03:00

39 lines
1.3 KiB
Diff

--- origsrc/libtirpc-1.0.2/configure.ac 2018-02-06 21:45:15.467634500 -0600
+++ src/libtirpc-1.0.2/configure.ac 2018-02-07 10:27:54.897376400 -0600
@@ -92,7 +92,7 @@ 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_LIB([pthread], [pthread_create])
-AC_CHECK_FUNCS([getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent])
+AC_CHECK_FUNCS([bindresvport getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent])
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
AC_OUTPUT(libtirpc.pc)
--- origsrc/libtirpc-1.0.2/src/bindresvport.c 2018-02-06 21:45:16.038017400 -0600
+++ src/libtirpc-1.0.2/src/bindresvport.c 2018-02-07 10:29:18.679180800 -0600
@@ -32,6 +32,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>
@@ -49,6 +53,8 @@
#include <string.h>
#include <reentrant.h>
+#if !HAVE_BINDRESVPORT
+
extern pthread_mutex_t port_lock;
/*
@@ -246,3 +252,4 @@ bindresvport_sa(sd, sa)
return (error);
}
#endif
+#endif /* !HAVE_BINDRESVPORT */