Code

Fixed (pedantic) void-pointer to function-pointer cast warnings.
[sysdb.git] / t / utils / unixsock_test.c
index 4f1e0429e67ca338156597183fe2f6942b28bbcb..4502767868051bfb6ff33466b65f83283c0acdb8 100644 (file)
@@ -204,7 +204,9 @@ fdopen(int fd, const char *mode)
         * to use the original implementation */
        if (fd != myfd) {
                void *libc = dlopen_libc();
-               FILE *(*orig_fdopen)(int, const char *) = dlsym(libc, "fdopen");
+               FILE *(*orig_fdopen)(int, const char *);
+
+               orig_fdopen = (FILE *(*)(int, const char *))dlsym(libc, "fdopen");
 
                if (! orig_fdopen)
                        fail("INTERNAL ERROR: failed to load fdopen() from libc");