diff -Naur a/cfitsio.pc.cmake b/cfitsio.pc.cmake
--- a/cfitsio.pc.cmake	2022-10-31 19:40:23.000000000 +0100
+++ b/cfitsio.pc.cmake	2022-12-14 23:35:53.572102437 +0100
@@ -1,12 +1,12 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=@CMAKE_INSTALL_PREFIX@
 libdir=@LIB_DESTINATION@
-includedir=@INCLUDE_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@/cfitsio
 
 Name: cfitsio
 Description: FITS File Subroutine Library
 URL: https://heasarc.gsfc.nasa.gov/fitsio/
 Version: @CFITSIO_MAJOR@.@CFITSIO_MINOR@.@CFITSIO_MICRO@
 Libs: -L${libdir} -lcfitsio
-Libs.private: @PKG_CONFIG_LIBS@ -lm
-Cflags: -I${includedir}
+Libs.private: @PKG_CONFIG_LIBS@ -lm -z
+Cflags: -D_REENTRANT -I${includedir}
