The test program for "whether a program can dlopen itself" generates a
compiler warning, which turns into a failure when building with "-Wall
-Werror" in CFLAGS.  The error is in the libltdl/m4/libtool.m4 file, and
is due to the "fnord" function containing an unused variable.  Please
find attached a simple patch for this issue.

2010-06-15  Philip Allison  <philip.alli...@smoothwall.net>

        * libltdl/m4/libtool.m4 (_LT_TRY_DLOPEN_SELF): Fix unused
        variable warning in test program.

-- 
Philip Allison
Senior Developer

SmoothWall Ltd
1 John Charles Way
Leeds LS12 6QA
United Kingdom

1 800 959 3760     (USA, Canada and North America)
0870 1 999 500     (United Kingdom)
+44 870 1 999 500  (All other countries)

SmoothWall is registered in England: 4298247

This email and any attachments transmitted with it are confidential
to the intended recipient(s) and may not be communicated to any
other person or published by any means without the permission of
SmoothWall Limited.  Any opinions stated in this message are solely
those of the author.  See: http://smoothwall.net/company/email.php
for the full text of this notice.
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 22924a8..d35aab0 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -1658,10 +1658,10 @@ else
 /* When -fvisbility=hidden is used, assume the code has been annotated
    correspondingly for the symbols needed.  */
 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-void fnord () __attribute__((visibility("default")));
+int fnord () __attribute__((visibility("default")));
 #endif
 
-void fnord () { int i=42; }
+int fnord () { return 42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to