about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--dlfcn/tst-rec-dlopen.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index aadde3fc34..3b1750cbeb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-15  Florian Weimer  <fweimer@redhat.com>
+
+	* dlfcn/tst-rec-dlopen.c (call_func): Cast dlsym result, fixing an
+	aliasing violation.
+
 2015-12-14  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #18472]
diff --git a/dlfcn/tst-rec-dlopen.c b/dlfcn/tst-rec-dlopen.c
index 01353fbc86..1ab7aa91aa 100644
--- a/dlfcn/tst-rec-dlopen.c
+++ b/dlfcn/tst-rec-dlopen.c
@@ -57,7 +57,7 @@ call_func (const char *dso_name, const char *func_name)
   dlerror ();
 
   /* Lookup func.  */
-  *(void **) (&func) = dlsym (dso, func_name);
+  func = (int (*) (void)) dlsym (dso, func_name);
   if (func == NULL)
     {
       err = dlerror ();