@@ -23,12 +23,15 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <bsd/string.h>
#include <unistd.h>
#include <inttypes.h>
#include "fwts_acpi_object_eval.h"
#include "crsdump.h"
+#ifdef HAVE_BSD_STRING_H
+#include <bsd/string.h>
+#endif
+
typedef struct {
const char *label; /* Field label */
size_t offset; /* Offset into _CRS buffer */
@@ -25,7 +25,10 @@
#include <unistd.h>
#include <inttypes.h>
#include <string.h>
+
+#ifdef HAVE_BSD_STRING_H
#include <bsd/string.h>
+#endif
#include "fwts_acpi_object_eval.h"
@@ -24,7 +24,10 @@
#include <dirent.h>
#include <ctype.h>
#include <math.h>
+
+#ifdef HAVE_BSD_STRING_H
#include <bsd/string.h>
+#endif
#define CPU_FREQ_PATH "/sys/devices/system/cpu"
#define CPU_INFO_PATH "/proc/cpuinfo"
@@ -25,11 +25,14 @@
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
-#include <bsd/string.h>
#include <limits.h>
#include <dirent.h>
#include <inttypes.h>
+#ifdef HAVE_BSD_STRING_H
+#include <bsd/string.h>
+#endif
+
static inline bool fwts_battery_match(
const uint32_t index,
const uint32_t loop_index)
@@ -26,7 +26,10 @@
#include <string.h>
#include <limits.h>
#include <dirent.h>
+
+#ifdef HAVE_BSD_STRING_H
#include <bsd/string.h>
+#endif
#define FWTS_PROC_ACPI_BUTTON "/proc/acpi/button"
@@ -26,13 +26,16 @@
#include <ctype.h>
#include <time.h>
#include <getopt.h>
-#include <bsd/string.h>
#include <sys/utsname.h>
#include <sys/time.h>
#include "fwts.h"
#include "fwts_pm_method.h"
+#ifdef HAVE_BSD_STRING_H
+#include <bsd/string.h>
+#endif
+
typedef struct {
const char *title; /* Test category */
fwts_framework_flags flag; /* Mask of category */
@@ -20,7 +20,6 @@
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
-#include <bsd/string.h>
#include <errno.h>
#include <inttypes.h>
#include <dirent.h>
@@ -37,6 +36,10 @@
#include "fwts.h"
+#ifdef HAVE_BSD_STRING_H
+#include <bsd/string.h>
+#endif
+
#define FWTS_HWINFO_LISTS_SAME (0)
#define FWTS_HWINFO_LISTS_DIFFER (1)
#define FWTS_HWINFO_LISTS_OUT_OF_MEMORY (-1)
@@ -23,7 +23,10 @@
#include "fwts_kernel.h"
#include <stdlib.h>
#include <stdio.h>
+
+#ifdef HAVE_BSD_STRING_H
#include <bsd/string.h>
+#endif
#define CONFIG_FILE_PREFIX "/boot/config-"
#define CONFIG_FILE_PROC "/proc/config.gz"
@@ -28,10 +28,13 @@
#include <stdlib.h>
#include <errno.h>
#include <sys/utsname.h>
-#include <bsd/string.h>
#include "fwts.h"
+#ifdef HAVE_BSD_STRING_H
+#include <bsd/string.h>
+#endif
+
/*
* fwts_module_path()
* build a new path based on basename path and