[igt-dev] [PATCH i-g-t 06/29] tools/intel_gpu_top: Use POSIX signal handler type definition

D Scott Phillips d.scott.phillips at intel.com
Wed Dec 11 00:52:12 UTC 2019


The type sighandler_t is a GNU extension which isn't available on
FreeBSD, where it instead follows the POSIX specification of a raw
function pointer type.

Signed-off-by: D Scott Phillips <d.scott.phillips at intel.com>
---
 tools/intel_gpu_top.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index cc8db7c5..2ea484cf 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -1299,7 +1299,7 @@ int main(int argc, char **argv)
 	}
 
 	if (output_mode != INTERACTIVE) {
-		sighandler_t sig = signal(SIGINT, sigint_handler);
+		void (* sig)(int) = signal(SIGINT, sigint_handler);
 
 		if (sig == SIG_ERR)
 			fprintf(stderr, "Failed to install signal handler!\n");
-- 
2.23.0



More information about the igt-dev mailing list