summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Austen <austenc@us.ibm.com>2015-11-01 06:34:56 -0600
committerPatrick Williams <patrick@stwcx.xyz>2015-11-01 06:34:56 -0600
commitb45c4cb9f04bf295411c420c1ac05a0dd42e5e74 (patch)
treed8b31b599628ec2ff8df2d9841ab13079373e6d2
parent7bb1b15e20087ff630da97acd48eba3cb958734c (diff)
downloadipmi-fru-parser-b45c4cb9f04bf295411c420c1ac05a0dd42e5e74.tar.gz
ipmi-fru-parser-b45c4cb9f04bf295411c420c1ac05a0dd42e5e74.zip
Fix compile and linker problems
-rw-r--r--Makefile2
-rw-r--r--frup.h9
-rw-r--r--writefrudata.C4
3 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index e635432..f56eba3 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ OPTFLAGS ?= -O3 -g -pipe
CFLAGS ?= $(OPTFLAGS)
CXXFLAGS ?= $(OPTFLAGS)
CFLAGS += -Wall -flto -fPIC
-CXXFLAGS += --std=gnu++14 -Wall -flto -fPIC -I.
+CXXFLAGS += --std=gnu++14 -Wall -flto -fPIC
__PKG_CONFIG = $(if $1,$(shell pkg-config $2 $1))
diff --git a/frup.h b/frup.h
index 3286260..8400951 100644
--- a/frup.h
+++ b/frup.h
@@ -3,10 +3,19 @@
#include <systemd/sd-bus.h>
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
/* Parse an IPMI write fru data message into a dictionary containing name value pair of VPD entries.*/
int parse_fru (const void* msgbuf, sd_bus_message* vpdtbl);
int parse_fru_area (const uint8_t area, const void* msgbuf, const uint8_t len, sd_bus_message* vpdtbl);
+#ifdef __cplusplus
+}
+#endif
+
enum ipmi_fru_area_type
{
IPMI_FRU_AREA_INTERNAL_USE = 0x00,
diff --git a/writefrudata.C b/writefrudata.C
index 30ba39a..153ac93 100644
--- a/writefrudata.C
+++ b/writefrudata.C
@@ -1,4 +1,4 @@
-#include <ipmid-api.h>
+#include <host-ipmid/ipmid-api.h>
#include <vector>
#include <stdlib.h>
#include <dlfcn.h>
@@ -7,6 +7,8 @@
#include "frup.h"
#include "writefrudata.H"
#include <systemd/sd-bus.h>
+#include <unistd.h>
+
void register_netfn_storage_write_fru() __attribute__((constructor));
OpenPOWER on IntegriCloud