* [nfs-utils PATCH 1/1] Let the configure script find getrpcbynumber in libtirpc
@ 2019-11-22 23:24 Petr Vorel
2019-12-11 18:37 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: Petr Vorel @ 2019-11-22 23:24 UTC (permalink / raw)
To: linux-nfs; +Cc: Thomas Petazzoni, Petr Vorel
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
The getrpcbynumber() function may not be available in the C library,
but only in the libtirpc library. Take this into account when checking
for the existence of getrpcbynumber() and getrpcbynumber_r().
Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
[ pvorel: patch taken from Buildroot distribution ]
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.ac | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 949ff9fc..e9699752 100644
--- a/configure.ac
+++ b/configure.ac
@@ -534,11 +534,23 @@ AC_FUNC_STAT
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \
gethostbyaddr gethostbyname gethostname getmntent \
- getnameinfo getrpcbyname getrpcbynumber getrpcbynumber_r getifaddrs \
+ getnameinfo getrpcbyname getifaddrs \
gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \
ppoll realpath rmdir select socket strcasecmp strchr strdup \
strerror strrchr strtol strtoul sigprocmask name_to_handle_at])
+save_CFLAGS=$CFLAGS
+save_LIBS=$LIBS
+CFLAGS="$CFLAGS $AM_CPPFLAGS"
+LIBS="$LIBS $LIBTIRPC"
+AC_CHECK_FUNCS([getrpcbynumber getrpcbynumber_r])
+CFLAGS=$save_CFLAGS
+LIBS=$save_LIBS
+
+if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then
+ AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available])
+fi
+
dnl *************************************************************
dnl Check for data sizes
dnl *************************************************************
--
2.24.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [nfs-utils PATCH 1/1] Let the configure script find getrpcbynumber in libtirpc
2019-11-22 23:24 [nfs-utils PATCH 1/1] Let the configure script find getrpcbynumber in libtirpc Petr Vorel
@ 2019-12-11 18:37 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2019-12-11 18:37 UTC (permalink / raw)
To: Petr Vorel, linux-nfs; +Cc: Thomas Petazzoni
On 11/22/19 6:24 PM, Petr Vorel wrote:
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>
> The getrpcbynumber() function may not be available in the C library,
> but only in the libtirpc library. Take this into account when checking
> for the existence of getrpcbynumber() and getrpcbynumber_r().
>
> Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
> [ pvorel: patch taken from Buildroot distribution ]
> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed... (tag: nfs-utils-2-4-3-rc3)
steved.
> ---
> configure.ac | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 949ff9fc..e9699752 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -534,11 +534,23 @@ AC_FUNC_STAT
> AC_FUNC_VPRINTF
> AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \
> gethostbyaddr gethostbyname gethostname getmntent \
> - getnameinfo getrpcbyname getrpcbynumber getrpcbynumber_r getifaddrs \
> + getnameinfo getrpcbyname getifaddrs \
> gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \
> ppoll realpath rmdir select socket strcasecmp strchr strdup \
> strerror strrchr strtol strtoul sigprocmask name_to_handle_at])
>
> +save_CFLAGS=$CFLAGS
> +save_LIBS=$LIBS
> +CFLAGS="$CFLAGS $AM_CPPFLAGS"
> +LIBS="$LIBS $LIBTIRPC"
> +AC_CHECK_FUNCS([getrpcbynumber getrpcbynumber_r])
> +CFLAGS=$save_CFLAGS
> +LIBS=$save_LIBS
> +
> +if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then
> + AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available])
> +fi
> +
> dnl *************************************************************
> dnl Check for data sizes
> dnl *************************************************************
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-11 18:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 23:24 [nfs-utils PATCH 1/1] Let the configure script find getrpcbynumber in libtirpc Petr Vorel
2019-12-11 18:37 ` Steve Dickson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).