explicitly cast result of dlsym() to prevent compiler warnings
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Wed, 1 Oct 2003 00:55:44 +0000 (00:55 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Wed, 1 Oct 2003 00:55:44 +0000 (00:55 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@36 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/src/rpm-fake.c

index 6ef4f66..f063616 100644 (file)
@@ -41,7 +41,7 @@
 #define LIBNAME                "rpm-fake.so"
 #define PLATFORM_FILE  "/etc/rpm/platform"
 
-#define INIT(FILE,FUNC)        FUNC##_func = dlsym(FILE, #FUNC)
+#define INIT(FILE,FUNC)        FUNC##_func = ((__typeof__(FUNC) *) (dlsym(FILE, #FUNC)))
 #define DECLARE(FUNC)  static __typeof__(FUNC) *       FUNC##_func = 0
 
 static bool            is_initialized = false;