diff -ur cfitsio-3.47/cfitsio.pc.in cfitsio-3.47.pkg/cfitsio.pc.in
--- cfitsio-3.47/cfitsio.pc.in	2019-05-08 17:34:49.000000000 +0200
+++ cfitsio-3.47.pkg/cfitsio.pc.in	2019-08-01 15:56:52.064310329 +0200
@@ -1,12 +1,12 @@
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
-includedir=@includedir@
+includedir=@includedir@/cfitsio
 
 Name: cfitsio
 Description: FITS File Subroutine Library
 URL: https://heasarc.gsfc.nasa.gov/fitsio/
 Version: @CFITSIO_MAJOR@.@CFITSIO_MINOR@
-Libs: -L${libdir} -lcfitsio
-Libs.private: -lm @LIBS@
-Cflags: -I${includedir}
+Libs: -L${libdir} -lcfitsio
+Libs.private: -lm -lz @LIBS@
+Cflags: -D_REENTRANT -I${includedir}
