Skip to contentSkip to conversation

reexport.h: Include unistd.h to compile with musl

PATCH In review [email protected] 2 participants 3 messages Dec 14, 2023 – Nov 11, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reexport.h: Include unistd.h to compile with musl

From: Robert Yang <[email protected]>

Fixed error when compile with musl
reexport.c: In function 'reexpdb_init':
reexport.c:62:17: error: implicit declaration of function 'sleep' [-Werror=implicit-function-declaration]
62 | sleep(1);

---
 support/reexport/reexport.h | 2 ++
 1 file changed, 2 insertions(+)
support/reexport/reexport.h +2 -0
index 85fd59c1..02f86844 100644
@@ -1,6 +1,8 @@
 #ifndef REEXPORT_H
 #define REEXPORT_H
 
+#include <unistd.h>
+
 #include "nfslib.h"
 
 enum {
Signature · 1 line
2.35.5
#1 lore raw
Quoted 11 lines · On 12/14/23 5:12 AM, [email protected] wrote:

From: Robert Yang <[email protected]>

Fixed error when compile with musl
reexport.c: In function 'reexpdb_init':
reexport.c:62:17: error: implicit declaration of function 'sleep' [-Werror=implicit-function-declaration]

    62 |                 sleep(1);
---
  support/reexport/reexport.h | 2 ++
  1 file changed, 2 insertions(+)

I believe this is fixed the last RC release
Please me know if that is not the case.

steved.

Quoted 14 lines
support/reexport/reexport.h +2 -0
index 85fd59c1..02f86844 100644
@@ -1,6 +1,8 @@
  #ifndef REEXPORT_H
  #define REEXPORT_H
 
+#include <unistd.h>
+
  #include "nfslib.h"
 
  enum {
#2 lore raw
In reply to [email protected]
Quoted 8 lines · On 12/14/23 4:12 AM, [email protected] wrote:

From: Robert Yang <[email protected]>

Fixed error when compile with musl
reexport.c: In function 'reexpdb_init':
reexport.c:62:17: error: implicit declaration of function 'sleep' [-Werror=implicit-function-declaration]

    62 |                 sleep(1);

Committed... (tag: nfs-utils-2-8-2-rc1)

steved.

Quoted 17 lines
---
  support/reexport/reexport.h | 2 ++
  1 file changed, 2 insertions(+)
support/reexport/reexport.h +2 -0
index 85fd59c1..02f86844 100644
@@ -1,6 +1,8 @@
  #ifndef REEXPORT_H
  #define REEXPORT_H
 
+#include <unistd.h>
+
  #include "nfslib.h"
 
  enum {