From: Michael Tremer Date: Mon, 14 Jun 2021 14:32:09 +0000 (+0000) Subject: libpakfire_reload: Drop it X-Git-Tag: 0.9.28~1253 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fea2e78097c1081fa0b2621dc6153e3af3d733e9;p=pakfire.git libpakfire_reload: Drop it Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index e3061207e..af39a0714 100644 --- a/Makefile.am +++ b/Makefile.am @@ -519,23 +519,6 @@ tests_libpakfire_util_LDADD = \ # ------------------------------------------------------------------------------ -lib_LTLIBRARIES += \ - libpakfire_preload.la - -libpakfire_preload_la_SOURCES = \ - src/libpakfire_preload/uname.c - -libpakfire_preload_la_LDFLAGS = \ - $(AM_LDFLAGS) \ - -shared \ - -module \ - -avoid-version - -libpakfire_preload_la_LIBADD = \ - $(DL_LIBS) - -# ------------------------------------------------------------------------------ - dist_scripts_SCRIPTS = \ src/scripts/check-buildroot \ src/scripts/check-fhs \ diff --git a/configure.ac b/configure.ac index ab0987076..564bafbd5 100644 --- a/configure.ac +++ b/configure.ac @@ -161,16 +161,6 @@ AC_CHECK_FUNCS([ \ unshare ]) -save_LIBS="$LIBS" - -# libdl -LIBS= -AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])]) -DL_LIBS="$LIBS" -AC_SUBST(DL_LIBS) - -LIBS="$save_LIBS" - PKG_CHECK_MODULES([ARCHIVE], [libarchive >= 3.3.3]) PKG_CHECK_MODULES([CURL], [libcurl]) PKG_CHECK_MODULES([PYTHON_DEVEL], [python-${PYTHON_VERSION}-embed], diff --git a/src/libpakfire_preload/uname.c b/src/libpakfire_preload/uname.c deleted file mode 100644 index f766ec47e..000000000 --- a/src/libpakfire_preload/uname.c +++ /dev/null @@ -1,50 +0,0 @@ - - -#include -#include -#include -#include /* for EXIT_FAILURE */ -#include /* for _exit() */ -#include -#include -#include -#include -#include - -#ifndef RTLD_NEXT -#define RTLD_NEXT ((void *) -1l) -#endif - -typedef int (*uname_t)(struct utsname * buf); - -static void *get_libc_func(const char *funcname) { - char *error; - - void *func = dlsym(RTLD_NEXT, funcname); - if ((error = dlerror()) != NULL) { - fprintf(stderr, "I can't locate libc function `%s' error: %s", funcname, error); - _exit(EXIT_FAILURE); - } - - return func; -} - -int uname(struct utsname *buf) { - char *env = NULL; - - /* Call real uname to get the information we need. */ - uname_t real_uname = (uname_t)get_libc_func("uname"); - int ret = real_uname((struct utsname *) buf); - - /* Replace release if requested. */ - if ((env = getenv("UTS_RELEASE")) != NULL) { - snprintf(buf->release, sizeof(buf->release) - 1, "%s", env); - } - - /* Replace machine type if requested. */ - if ((env = getenv("UTS_MACHINE")) != NULL) { - snprintf(buf->machine, sizeof(buf->machine) - 1, "%s", env); - } - - return ret; -}