]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
PR31866: reenable --enable-libdebuginfod=dummy
authorFrank Ch. Eigler <fche@redhat.com>
Sat, 8 Jun 2024 17:31:09 +0000 (13:31 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Sat, 8 Jun 2024 17:42:27 +0000 (13:42 -0400)
Tweak configure.ac to support $subject again.  Also tweak
debuginfod-find.c to not unconditionally include json-c.h, since it
may just be compiled in "dummy" mode, sans such prerequisites.  It
turns out debuginfod-find fails at run time very early in such a
configuration, long before it gets to jsonic activities.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
configure.ac
debuginfod/debuginfod-find.c

index ddea59525829ada22373f75a9ed5b7d7133e5cda..24e68d94a1943684e9a98f546ebdfff3a63e4a54 100644 (file)
@@ -846,6 +846,8 @@ AC_CHECK_HEADER(imaevm.h)
 # pronounce judgement on ability to build client, overridden by =yes/=no
 if test "x$enable_libdebuginfod" = "xno"; then
    true
+elif test "x$enable_libdebuginfod" = "xdummy"; then
+   true
 elif test "x$have_jsonc$have_libcurl" = "xyesyes"; then
    enable_libdebuginfod=yes
 elif test "x$enable_libdebuginfod" = "xyes" -o "x$enable_libdebuginfod" = "xdummy"; then
index 0ef80377a81bcad9241079e2c774d1a8ad9c50f3..deba95609f95da2915f9650585df7423f42831ae 100644 (file)
@@ -30,7 +30,9 @@
 #include <fcntl.h>
 #include <gelf.h>
 #include <libdwelf.h>
+#ifndef DUMMY_LIBDEBUGINFOD
 #include <json-c/json.h>
+#endif
 
 /* Name and version of program.  */
 ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
@@ -243,6 +245,7 @@ main(int argc, char** argv)
       
       rc = debuginfod_find_metadata (client, argv[remaining+1], argv[remaining+2],
                                      &cache_name);
+#ifndef DUMMY_LIBDEBUGINFOD
       if (rc >= 0)
         {
           /* We output a pprinted JSON object, not the regular debuginfod-find cached file path */
@@ -264,6 +267,7 @@ main(int argc, char** argv)
               return 1;
             }
         }
+#endif
     }
   else
     {