Files
meta-openembedded/meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/0001-include-missing-system-headers.patch
Khem Raj f5b0a13f01 sblim-sfcb: Include string.h for memcpy
Fixes build with latest musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-02-17 12:16:16 -08:00

161 lines
3.7 KiB
Diff

From c5b15ae9636a3b73407372cce87eb40ea78a68ea Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 2 Sep 2022 15:51:31 -0700
Subject: [PATCH] include missing system headers
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
brokerEnc.c | 2 ++
brokerOs.c | 1 +
mlog.c | 1 +
mofc/backend_sfcb.c | 2 +-
sfcbdump.c | 1 +
sfcbdumpP32onI32.c | 1 +
sfcbsem.c | 1 +
trace.c | 3 ++-
trace.h | 3 ++-
9 files changed, 12 insertions(+), 3 deletions(-)
--- a/brokerEnc.c
+++ b/brokerEnc.c
@@ -25,6 +25,8 @@
#include "constClass.h"
#include <sfcCommon/utilft.h>
+#include <string.h> /* strcasecmp */
+
extern const char *opGetClassNameChars(const CMPIObjectPath * cop);
extern const char *opGetNameSpaceChars(const CMPIObjectPath * cop);
extern CMPIConstClass *getConstClass(const char *ns, const char *cn);
--- a/brokerOs.c
+++ b/brokerOs.c
@@ -22,6 +22,7 @@
#include <pthread.h>
#include "native.h"
#include <stdlib.h>
+#include <string.h> /* strcmp */
static char *
resolveFileName(const char *filename)
--- a/mlog.c
+++ b/mlog.c
@@ -26,6 +26,7 @@ const char *_mlog_id =
#include <syslog.h>
#include <stdarg.h>
#include <stdio.h>
+#include <string.h> /* strcat */
#include <errno.h>
#include <signal.h>
#include "trace.h" /* for setSignal() */
--- a/mofc/backend_sfcb.c
+++ b/mofc/backend_sfcb.c
@@ -29,7 +29,7 @@
#include "backend.h"
#include "objectpath.h"
#include <sys/utsname.h>
-
+#include <string.h>
extern CMPIStatus sfcb_simpleArrayAdd(CMPIArray * array, CMPIValue * val, CMPIType type);
extern CMPIObjectPath *getObjectPath(char *path, char **msg);
--- a/sfcbdump.c
+++ b/sfcbdump.c
@@ -23,6 +23,7 @@
#include <errno.h>
#include <stddef.h>
#include <getopt.h>
+#include <string.h> /* strerror */
#include "objectImpl.h"
#define BINARY_NAME argv[0]
--- a/sfcbdumpP32onI32.c
+++ b/sfcbdumpP32onI32.c
@@ -22,6 +22,7 @@
#include <fcntl.h>
#include <errno.h>
#include <stddef.h>
+#include <string.h>
#include <getopt.h>
#include "objectImpl.h"
#include <byteswap.h>
--- a/sfcbsem.c
+++ b/sfcbsem.c
@@ -21,6 +21,7 @@
/* includes */
#include <stdio.h>
+#include <string.h>
#include <getopt.h>
#include <errno.h>
--- a/trace.c
+++ b/trace.c
@@ -25,6 +25,7 @@
#include "native.h"
#include <string.h>
#include <time.h>
+#include <pthread.h>
#include <sys/stat.h>
#include <sys/wait.h>
@@ -50,7 +51,7 @@
char *processName = NULL;
int providerProcess = 0;
-int idleThreadId = 0;
+pthread_t idleThreadId = 0;
int terminating = 0;
int colorTrace;
--- a/trace.h
+++ b/trace.h
@@ -25,6 +25,7 @@
#include "mlog.h"
+#include <pthread.h>
extern unsigned long _sfcb_trace_mask;
/* use pointer indirect _sfcb_trace_mask to allow shared memory flag */
extern unsigned long *_ptr_sfcb_trace_mask;
@@ -162,7 +163,7 @@ extern sigHandler *setSignal(int sn, sig
extern char *processName;
extern int providerProcess;
-extern int idleThreadId;
+extern pthread_t idleThreadId;
extern int terminating;
#endif
--- a/support.c
+++ b/support.c
@@ -39,6 +39,7 @@
#include <err.h>
#endif
#include <errno.h>
+#include <string.h> /* memcpy */
#include "native.h"
#include "trace.h"
#include "control.h"
--- a/qualifier.c
+++ b/qualifier.c
@@ -19,6 +19,7 @@
*
*/
+#include <string.h> /* memcpy */
#include "objectImpl.h"
#include "qualifier.h"
--- a/objectImplSwapI32toP32.c
+++ b/objectImplSwapI32toP32.c
@@ -24,6 +24,7 @@
#include <byteswap.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h> /* memcpy */
#include <sfcCommon/utilft.h>
#include <sys/utsname.h>