diff mbox series

[nfs-utils] reexport.h: Include unistd.h to compile with musl

Message ID 20231214101206.70608-1-liezhi.yang@windriver.com (mailing list archive)
State New, archived
Headers show
Series [nfs-utils] reexport.h: Include unistd.h to compile with musl | expand

Commit Message

liezhi.yang@windriver.com Dec. 14, 2023, 10:12 a.m. UTC
From: Robert Yang <liezhi.yang@windriver.com>

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);

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 support/reexport/reexport.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Steve Dickson Jan. 4, 2024, 12:42 a.m. UTC | #1
On 12/14/23 5:12 AM, liezhi.yang@windriver.com wrote:
> From: Robert Yang <liezhi.yang@windriver.com>
> 
> 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);
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>   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.

> 
> diff --git a/support/reexport/reexport.h b/support/reexport/reexport.h
> index 85fd59c1..02f86844 100644
> --- a/support/reexport/reexport.h
> +++ b/support/reexport/reexport.h
> @@ -1,6 +1,8 @@
>   #ifndef REEXPORT_H
>   #define REEXPORT_H
>   
> +#include <unistd.h>
> +
>   #include "nfslib.h"
>   
>   enum {
diff mbox series

Patch

diff --git a/support/reexport/reexport.h b/support/reexport/reexport.h
index 85fd59c1..02f86844 100644
--- a/support/reexport/reexport.h
+++ b/support/reexport/reexport.h
@@ -1,6 +1,8 @@ 
 #ifndef REEXPORT_H
 #define REEXPORT_H
 
+#include <unistd.h>
+
 #include "nfslib.h"
 
 enum {