Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make error: implicit declaration of function ‘kill’ #2

Open
hlb-schmidt opened this issue Aug 28, 2019 · 0 comments
Open

make error: implicit declaration of function ‘kill’ #2

hlb-schmidt opened this issue Aug 28, 2019 · 0 comments

Comments

@hlb-schmidt
Copy link

error:

$> make
CC xmpl.c
xmpl.c: In function ‘xmpl_event_spawn’:
xmpl.c:1408:3: warning: implicit declaration of function ‘kill’ [-Wimplicit-function-declaration]
 1408 |   kill(pid, SIGKILL);
      |   ^~~~
xmpl.c:1408:13: error: ‘SIGKILL’ undeclared (first use in this function)
 1408 |   kill(pid, SIGKILL);
      |             ^~~~~~~
xmpl.c:1408:13: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:107: xmpl.o] Error 1

possible fix:

$> git diff
diff --git a/xmpl.h b/xmpl.h
index 6424c52..febfc16 100644
--- a/xmpl.h
+++ b/xmpl.h
@@ -16,6 +16,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <xcb/xcb.h>
+#include <signal.h>
 //#include <xcb/xcb_icccm.h>
 
 const static u_int32_t XMPL_EVENT_MASK_NULL =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant