The Samba-Bugzilla – Attachment 9924 Details for
Bug 10572
swrap_load_lib_handle() broken on GNU/kFreeBSD
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Use LIBC_SO from GNU libc, if available
0001-src-use-LIBC_SO-from-GNU-libc-if-available.patch (text/plain), 2.00 KB, created by
Pino Toscano
on 2014-05-08 11:44:09 UTC
(
hide
)
Description:
Use LIBC_SO from GNU libc, if available
Filename:
MIME Type:
Creator:
Pino Toscano
Created:
2014-05-08 11:44:09 UTC
Size:
2.00 KB
patch
obsolete
>From c3d319209ba999402fbeb9d5d149fa0d92103b57 Mon Sep 17 00:00:00 2001 >From: Pino Toscano <toscano.pino@tiscali.it> >Date: Thu, 8 May 2014 13:37:02 +0200 >Subject: [PATCH] src: use LIBC_SO from GNU libc, if available > >Look for gnu/lib-names.h and use the LIBC_SO define to dlopen libc, so >the right library is loaded without manually searching for libc.so.N. >--- > ConfigureChecks.cmake | 1 + > config.h.cmake | 1 + > src/socket_wrapper.c | 8 ++++++++ > 3 files changed, 10 insertions(+) > >diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake >index c05cbb9..8db5162 100644 >--- a/ConfigureChecks.cmake >+++ b/ConfigureChecks.cmake >@@ -51,6 +51,7 @@ check_include_file(sys/filio.h HAVE_SYS_FILIO_H) > check_include_file(sys/signalfd.h HAVE_SYS_SIGNALFD_H) > check_include_file(sys/eventfd.h HAVE_SYS_EVENTFD_H) > check_include_file(sys/timerfd.h HAVE_SYS_TIMERFD_H) >+check_include_file(gnu/lib-names.h HAVE_GNU_LIB_NAMES_H) > > # FUNCTIONS > check_function_exists(strncpy HAVE_STRNCPY) >diff --git a/config.h.cmake b/config.h.cmake >index abbf133..efa519b 100644 >--- a/config.h.cmake >+++ b/config.h.cmake >@@ -18,6 +18,7 @@ > #cmakedefine HAVE_SYS_SIGNALFD_H 1 > #cmakedefine HAVE_SYS_EVENTFD_H 1 > #cmakedefine HAVE_SYS_TIMERFD_H 1 >+#cmakedefine HAVE_GNU_LIB_NAMES_H 1 > > /************************ STRUCT MEMBERS *************************/ > >diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c >index 95643aa..38f7a44 100644 >--- a/src/socket_wrapper.c >+++ b/src/socket_wrapper.c >@@ -73,6 +73,9 @@ > #include <stdarg.h> > #include <stdbool.h> > #include <unistd.h> >+#ifdef HAVE_GNU_LIB_NAMES_H >+#include <gnu/lib-names.h> >+#endif > > enum swrap_dbglvl_e { > SWRAP_LOG_ERROR = 0, >@@ -418,6 +421,11 @@ static void *swrap_load_lib_handle(enum swrap_lib lib) > /* FALL TROUGH */ > case SWRAP_LIBC: > handle = swrap.libc_handle; >+#ifdef LIBC_SO >+ if (handle == NULL) { >+ handle = dlopen(LIBC_SO, flags); >+ } >+#endif > if (handle == NULL) { > for (handle = NULL, i = 10; handle == NULL && i >= 0; i--) { > char soname[256] = {0}; >-- >2.0.0.rc0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 10572
:
9923
| 9924 |
9925
|
9996
|
9997