]> git.ipfire.org Git - thirdparty/nftables.git/commit
profiling: Include unistd.h to avoid compiler warnings master
authorPhil Sutter <phil@nwl.cc>
Wed, 10 Jun 2026 11:54:01 +0000 (13:54 +0200)
committerPhil Sutter <phil@nwl.cc>
Wed, 10 Jun 2026 21:27:40 +0000 (23:27 +0200)
commit3e93d84755c55ac1b72137a487e5c6b2932f127d
treea73231b69188116f1f9d7b65e31444ade55604ef
parent3003f3681287b86ccaf2dd7c39d28cd133ab7962
profiling: Include unistd.h to avoid compiler warnings

RHEL8's gcc-8.5.0 emits these warnings:

src/profiling.c: In function ‘get_signalfd’:
src/profiling.c:32:3: warning: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration]
   close(fd);
   ^~~~~
   pclose
src/profiling.c: In function ‘check_signalfd’:
src/profiling.c:42:6: warning: implicit declaration of function ‘read’; did you mean ‘fread’? [-Wimplicit-function-declaration]
  if (read(fd, &info, sizeof(info)) < (signed)sizeof(info))
      ^~~~
      fread

Fixes: 868040f892238 ("configure: Implement --enable-profiling option")
Signed-off-by: Phil Sutter <phil@nwl.cc>
src/profiling.c