curl/curl-7.16.1-strict-aliasing.patch

15 lines
582 B
Diff

--- lib/ldap.c
+++ lib/ldap.c
@@ -204,7 +204,10 @@ static dynafunc DynaGetFunction(const ch
* cannot typecast a data pointer to a function pointer, but that's
* exactly what we need to do here to avoid compiler warnings on picky
* compilers! */
- *(void**) (&func) = dlsym(libldap, name);
+ /* mmarek@suse.cz: I guess we can live with the void* -> funcptr conversion
+ * on systems where dlsym is supported... anyway less harm that risking
+ * strict aliasing bugs... */
+ func = dlsym(libldap, name);
}
#elif defined(WIN32)
if (libldap) {