Skip to contentSkip to conversation

libmpathutils/uxsock.c: Include string.h for memcpy

PATCH In review Khem Raj 3 participants 3 messages Feb 17, 2025 – Feb 24, 2025 Device mapper

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 libmpathutils/uxsock.c: Include string.h for memcpy

Fixes
uxsock.c:72:2: error: call to undeclared library function 'memcpy' with type 'void *(void *, const void *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Cc Benjamin Marzinski <[email protected]>
Cc Martin Wilck <[email protected]>
---
 libmpathutil/uxsock.c | 1 +
 1 file changed, 1 insertion(+)
libmpathutil/uxsock.c +1 -0
index 2135476d..a474874e 100644
@@ -8,6 +8,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdarg.h>
+#include <string.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Khem Raj

Fixes
uxsock.c:72:2: error: call to undeclared library function 'memcpy' with type 'void *(void *, const void *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Quoted 20 lines
Cc Benjamin Marzinski <[email protected]>
Cc Martin Wilck <[email protected]>
---
 libmpathutil/uxsock.c | 1 +
 1 file changed, 1 insertion(+)
libmpathutil/uxsock.c +1 -0
index 2135476d..a474874e 100644
@@ -8,6 +8,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdarg.h>
+#include <string.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <sys/types.h>
#2 lore raw
Quoted 8 lines · Benjamin Marzinski
Quoted 5 lines · Khem Raj

Fixes
uxsock.c:72:2: error: call to undeclared library function 'memcpy' with type 'void *(void *, const void *, unsigned long)'; ISO C99 and later do not support implicit function declarations [- Wimplicit-function-declaration]

Thanks, it turns out that we have this include already in the queue branch, but I applied your patch on stable-0.11.y and stable-0.10.y.

Regards
Martin

Quoted 21 lines
Quoted 20 lines
Cc Benjamin Marzinski <[email protected]>
Cc Martin Wilck <[email protected]>

---
 libmpathutil/uxsock.c | 1 +

 1 file changed, 1 insertion(+)
libmpathutil/uxsock.c +1 -0
index 2135476d..a474874e 100644
@@ -8,6 +8,7 @@
  #include <stdlib.h>
  #include <unistd.h>
  #include <stdarg.h>
+#include <string.h>
  #include <fcntl.h>
  #include <sys/ioctl.h>
  #include <sys/types.h>