add creal/cimag macros in complex.h (and use them in the functions defs)
[musl] / src / complex / cimag.c
index 5e1ad46..0095564 100644 (file)
@@ -2,6 +2,5 @@
 
 double (cimag)(double complex z)
 {
 
 double (cimag)(double complex z)
 {
-       union dcomplex u = {z};
-       return u.a[1];
+       return cimag(z);
 }
 }