Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libwhich for openSUSE:Factory 
checked in at 2026-04-07 16:34:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libwhich (Old)
 and      /work/SRC/openSUSE:Factory/.libwhich.new.21863 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libwhich"

Tue Apr  7 16:34:06 2026 rev:3 rq:1344893 version:1.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libwhich/libwhich.changes        2022-12-04 
14:59:11.360558897 +0100
+++ /work/SRC/openSUSE:Factory/.libwhich.new.21863/libwhich.changes     
2026-04-07 16:50:30.168496845 +0200
@@ -1,0 +2,9 @@
+Mon Mar 30 18:02:34 UTC 2026 - Andreas Stieger <[email protected]>
+
+- update to 1.3.0:
+  * support LIBWHICH_LIBRARY_PATH=x:y:z, which libwhich uses to
+    init LD_LIBRARY_PATH before it reruns itself, so dlopen(...)
+    can locate libraries in non-standard search paths used by
+    certain build systems
+
+-------------------------------------------------------------------

Old:
----
  libwhich-1.2.0.tar.gz

New:
----
  libwhich-1.3.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libwhich.spec ++++++
--- /var/tmp/diff_new_pack.4fBpaQ/_old  2026-04-07 16:50:30.824524001 +0200
+++ /var/tmp/diff_new_pack.4fBpaQ/_new  2026-04-07 16:50:30.828524168 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libwhich
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           libwhich
-Version:        1.2.0
+Version:        1.3.0
 Release:        0
 Summary:        Which for Dynamic Libraries
 License:        MIT
@@ -29,13 +29,13 @@
 A command line utility to locate shared libraries by name.
 
 %prep
-%setup -q
+%autosetup -p1
 
 %build
 %make_build
 
 %install
-install -D -m 755 libwhich %{buildroot}/%{_bindir}/libwhich
+%make_install
 
 %files
 %license LICENSE

++++++ libwhich-1.2.0.tar.gz -> libwhich-1.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libwhich-1.2.0/libwhich.c 
new/libwhich-1.3.0/libwhich.c
--- old/libwhich-1.2.0/libwhich.c       2022-10-31 21:31:01.000000000 +0100
+++ new/libwhich-1.3.0/libwhich.c       2026-02-13 20:11:04.000000000 +0100
@@ -56,7 +56,7 @@
 {
     return putc(c, stdout);
 }
-void abort() {
+void abort(void) {
     ExitProcess(128 + 6);
 }
 LPWSTR *CommandLineToArgv(LPWSTR lpCmdLine, int *pNumArgs)
@@ -133,8 +133,16 @@
 #else
 #include <dlfcn.h>
 #include <stdio.h>
+#include <unistd.h>
 typedef char WCHAR;
 #define T(str) str
+
+#if defined(__APPLE__)
+#define LIBWHICH_LD_LIBRARY_PATH "DYLD_LIBRARY_PATH"
+#else
+#define LIBWHICH_LD_LIBRARY_PATH "LD_LIBRARY_PATH"
+#endif
+
 #endif
 
 #ifndef RTLD_LAZY
@@ -182,7 +190,7 @@
 #if defined(__APPLE__)
 #include <mach-o/dyld.h>
 
-struct vector_t dllist()
+struct vector_t dllist(void)
 {
     struct vector_t dynamic_libraries;
     dynamic_libraries.length = _dyld_image_count();
@@ -217,14 +225,14 @@
     dynamic_libraries->data[i] = info->dlpi_name;
     return 0;
 }
-struct vector_t dllist()
+struct vector_t dllist(void)
 {
     struct vector_t dynamic_libraries = {NULL, 0};
     dl_iterate_phdr(get_names, (void*)&dynamic_libraries);
     return dynamic_libraries;
 }
 
-#if defined(__linux__) || defined(__FreeBSD__)  // Use `dlinfo` API, when 
supported
+#if (defined(__linux__) || defined(__FreeBSD__)) && !defined(ANDROID) && 
!defined(__ANDROID__) // Use `dlinfo` API, when supported
 const char *dlpath(void *handle, struct vector_t name)
 {
     struct link_map *map;
@@ -250,7 +258,7 @@
 
 #elif defined(_WIN32)
 
-const STR dlerror() {
+const STR dlerror(void) {
     STR errmsg;
     FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
         FORMAT_MESSAGE_FROM_SYSTEM |
@@ -280,7 +288,7 @@
     }
 }
 
-struct vector_t dllist()
+struct vector_t dllist(void)
 {
     struct vector_t dynamic_libraries = {NULL, 0};
     HMODULE _hModules[32];
@@ -336,6 +344,19 @@
         fputs(T(")\n"), stdout);
         return 1;
     }
+#ifndef _WIN32
+    // If LIBWHICH_LIBRARY_PATH is set, re-run the program with LD_LIBRARY_PATH
+    // or DYLD_LIBRARY_PATH set instead, so dlopen picks up these library 
paths.
+    const char *libwhich_path = getenv("LIBWHICH_LIBRARY_PATH");
+    if (libwhich_path) {
+        setenv(LIBWHICH_LD_LIBRARY_PATH, libwhich_path, 1);
+        unsetenv("LIBWHICH_LIBRARY_PATH");
+        if (execvp(argv[0], (char **)argv) == -1) {
+            perror("libwhich: execvp");
+            return 1;
+        }
+    }
+#endif
     struct vector_t before = dllist();
     void *lib = dlopen(libname, RTLD_LAZY);
     if (!lib) {

Reply via email to