diff mbox series

[RFC,3/5] nfsref: Remove unneeded #include in utils/nfsref/nfsref.c

Message ID 170050643249.123525.7457995133948275163.stgit@manet.1015granger.net (mailing list archive)
State New, archived
Headers show
Series Possible changes to nfs-utils junction support | expand

Commit Message

Chuck Lever Nov. 20, 2023, 6:53 p.m. UTC
From: Chuck Lever <chuck.lever@oracle.com>

Neil Brown says:
> The only thing that was interesting is that nfsref.c includes
> sys/capability.h, and I didn't have libcap declared as BuildRequires.
> The ./configure script didn't complain that libcap was missing - instead
> the build failed.
>
> Other places in nfs-utils that include capability.h protect it with
> #ifdef HAVE_SYS_CAPABILITY_H
>
> If nfsref.c followed that pattern I wouldn't have received an error.
> But then I wouldn't have added a dependency on libcap.
> Do I really want libcap??  I don't know.
> But I cannot see where nfsref.c uses libcap or prctl.  So maybe
> those includes aren't needed.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 utils/nfsref/nfsref.c |    2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/utils/nfsref/nfsref.c b/utils/nfsref/nfsref.c
index 7f97d01f55ca..aa8414b425fb 100644
--- a/utils/nfsref/nfsref.c
+++ b/utils/nfsref/nfsref.c
@@ -24,8 +24,6 @@ 
  */
 
 #include <sys/types.h>
-#include <sys/capability.h>
-#include <sys/prctl.h>
 #include <sys/stat.h>
 
 #include <stdbool.h>