[PATCH] Fixed compilation errors in modules mostly related to strlcpy

9 views
Skip to first unread message

Waldemar Kozaczuk

unread,
Jul 20, 2019, 3:52:08 PM7/20/19
to osv...@googlegroups.com, Waldemar Kozaczuk
Signed-off-by: Waldemar Kozaczuk <jwkoz...@gmail.com>
---
modules/cloud-init/Makefile | 6 +++---
modules/golang/Makefile | 6 ++----
modules/httpserver-api/Makefile | 9 +++++----
modules/httpserver-api/api/env.cc | 1 +
modules/java-base/common.gmk | 1 -
5 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/modules/cloud-init/Makefile b/modules/cloud-init/Makefile
index daee8c38..81321f33 100644
--- a/modules/cloud-init/Makefile
+++ b/modules/cloud-init/Makefile
@@ -1,9 +1,9 @@
-INCLUDES = -I. -I../../include -I../../arch/$(ARCH) -I../.. \
- -I../../build/$(mode)/gen/include
+SRC = $(shell readlink -f ../..)
+include $(SRC)/modules/java-base/common.gmk

autodepend = -MD -MT $@ -MP
CXXFLAGS = -g -rdynamic -Wall -std=c++11 -fPIC $(INCLUDES) $(autodepend)
-src = ../..
+src = $(SRC)
arch = x64

boost-libs := -lboost_system -lboost_filesystem
diff --git a/modules/golang/Makefile b/modules/golang/Makefile
index 3ffe1687..435895ee 100644
--- a/modules/golang/Makefile
+++ b/modules/golang/Makefile
@@ -1,5 +1,5 @@
-INCLUDES = -I. -I../../include -I../../arch/$(ARCH) -I../.. \
- -I../../build/$(mode)/gen/include
+SRC = $(shell readlink -f ../..)
+include $(SRC)/modules/java-base/common.gmk

autodepend = -MD -MT $@ -MP
CXXFLAGS = -g -rdynamic -Wall -std=c++11 -fPIC $(INCLUDES) $(autodepend)
@@ -10,8 +10,6 @@ CPP_FILES := $(TARGET).cc
OBJ_FILES := $(addprefix obj/,$(CPP_FILES:.cc=.o))
DEPS := $(OBJ_FILES:.o=.d)

-LIBS = -lpthread
-
quiet = $(if $V, $1, @echo " $2"; $1)
very-quiet = $(if $V, $1, @$1)

diff --git a/modules/httpserver-api/Makefile b/modules/httpserver-api/Makefile
index c05ca70c..6cc00517 100644
--- a/modules/httpserver-api/Makefile
+++ b/modules/httpserver-api/Makefile
@@ -1,5 +1,6 @@
-INCLUDES = -I. -I../../include -I../../arch/$(ARCH) -I../.. \
- -I../../build/$(mode)/gen/include
+SRC = $(shell readlink -f ../..)
+include $(SRC)/modules/java-base/common.gmk
+INCLUDES += -I. -I $(SRC)/libc/internal

# compiler flags:
# -g adds debugging information to the executable file
@@ -95,8 +96,8 @@ obj/%.o: %.cc
$(call quiet, $(CXX) $(CXXFLAGS) -c -MMD -o $@ $<, CXX $@)

clean:
- $(call quiet, $(RM) $(TARGET), CLEAN)
- $(call very-quiet, $(RM) lib*.so)
+ $(call quiet, $(RM) -f $(TARGET), CLEAN)
+ $(call very-quiet, $(RM) -f lib*.so)
$(call very-quiet, $(RM) -rf obj)
$(call very-quiet, $(RM) -rf autogen)
$(call very-quiet, $(RM) -f *usr*.manifest)
diff --git a/modules/httpserver-api/api/env.cc b/modules/httpserver-api/api/env.cc
index ed46d163..fcc7fe64 100644
--- a/modules/httpserver-api/api/env.cc
+++ b/modules/httpserver-api/api/env.cc
@@ -8,6 +8,7 @@
#include "env.hh"
#include "autogen/env.json.hh"
#include <stdlib.h>
+#include <libc.h>

namespace httpserver {

diff --git a/modules/java-base/common.gmk b/modules/java-base/common.gmk
index 9331ce6a..e51b0796 100644
--- a/modules/java-base/common.gmk
+++ b/modules/java-base/common.gmk
@@ -13,7 +13,6 @@ autodepend = -MD -MT $@ -MP
COMMON_FLAGS = -g -Wall -fPIC $(INCLUDES) -O2 $(autodepend) -DCONF_debug_memory=0 -D_KERNEL
CXXFLAGS = -std=c++11 $(COMMON_FLAGS)
CFLAGS = -std=gnu99 $(COMMON_FLAGS)
-#CXXFLAGS = -g -Wall -std=c++11 -fPIC $(INCLUDES) -O2 $(autodepend) $(configuration)
src = $(shell readlink -f ../..)

RM := /bin/rm
--
2.20.1

Commit Bot

unread,
Jul 21, 2019, 3:00:57 AM7/21/19
to osv...@googlegroups.com, Waldemar Kozaczuk
From: Waldemar Kozaczuk <jwkoz...@gmail.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master

Fixed compilation errors in modules mostly related to strlcpy

Signed-off-by: Waldemar Kozaczuk <jwkoz...@gmail.com>
Message-Id: <20190720195201.6...@gmail.com>

---
diff --git a/modules/cloud-init/Makefile b/modules/cloud-init/Makefile
--- a/modules/cloud-init/Makefile
+++ b/modules/cloud-init/Makefile
@@ -1,9 +1,9 @@
-INCLUDES = -I. -I../../include -I../../arch/$(ARCH) -I../.. \
- -I../../build/$(mode)/gen/include
+SRC = $(shell readlink -f ../..)
+include $(SRC)/modules/java-base/common.gmk

autodepend = -MD -MT $@ -MP
CXXFLAGS = -g -rdynamic -Wall -std=c++11 -fPIC $(INCLUDES) $(autodepend)
-src = ../..
+src = $(SRC)
arch = x64

boost-libs := -lboost_system -lboost_filesystem
diff --git a/modules/golang/Makefile b/modules/golang/Makefile
--- a/modules/golang/Makefile
+++ b/modules/golang/Makefile
@@ -1,5 +1,5 @@
-INCLUDES = -I. -I../../include -I../../arch/$(ARCH) -I../.. \
- -I../../build/$(mode)/gen/include
+SRC = $(shell readlink -f ../..)
+include $(SRC)/modules/java-base/common.gmk

autodepend = -MD -MT $@ -MP
CXXFLAGS = -g -rdynamic -Wall -std=c++11 -fPIC $(INCLUDES) $(autodepend)
@@ -10,8 +10,6 @@ CPP_FILES := $(TARGET).cc
OBJ_FILES := $(addprefix obj/,$(CPP_FILES:.cc=.o))
DEPS := $(OBJ_FILES:.o=.d)

-LIBS = -lpthread
-
quiet = $(if $V, $1, @echo " $2"; $1)
very-quiet = $(if $V, $1, @$1)

diff --git a/modules/httpserver-api/Makefile
b/modules/httpserver-api/Makefile
--- a/modules/httpserver-api/Makefile
+++ b/modules/httpserver-api/Makefile
@@ -1,5 +1,6 @@
-INCLUDES = -I. -I../../include -I../../arch/$(ARCH) -I../.. \
- -I../../build/$(mode)/gen/include
+SRC = $(shell readlink -f ../..)
+include $(SRC)/modules/java-base/common.gmk
+INCLUDES += -I. -I $(SRC)/libc/internal

# compiler flags:
# -g adds debugging information to the executable file
@@ -95,8 +96,8 @@ obj/%.o: %.cc
$(call quiet, $(CXX) $(CXXFLAGS) -c -MMD -o $@ $<, CXX $@)

clean:
- $(call quiet, $(RM) $(TARGET), CLEAN)
- $(call very-quiet, $(RM) lib*.so)
+ $(call quiet, $(RM) -f $(TARGET), CLEAN)
+ $(call very-quiet, $(RM) -f lib*.so)
$(call very-quiet, $(RM) -rf obj)
$(call very-quiet, $(RM) -rf autogen)
$(call very-quiet, $(RM) -f *usr*.manifest)
diff --git a/modules/httpserver-api/api/env.cc
b/modules/httpserver-api/api/env.cc
--- a/modules/httpserver-api/api/env.cc
+++ b/modules/httpserver-api/api/env.cc
@@ -8,6 +8,7 @@
#include "env.hh"
#include "autogen/env.json.hh"
#include <stdlib.h>
+#include <libc.h>

namespace httpserver {

diff --git a/modules/java-base/common.gmk b/modules/java-base/common.gmk
Reply all
Reply to author
Forward
0 new messages