Fix systemd compile issue with new gcc build toolchain
With new toolchain(gcc 4.8.5-36), some values become deprecated, and need be replaced with new values. Depends-On: https://review.openstack.org/629483 Story: 2004522 Task: 28931 Change-Id: I02ccfef4fb21490e7a32e0c8dbd892b2c0be4ea9 Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
This commit is contained in:
parent
f5166e8777
commit
1a92bd11e5
@ -1,2 +1,2 @@
|
||||
TIS_PATCH_VER=10
|
||||
TIS_PATCH_VER=11
|
||||
BUILD_IS_SLOW=7
|
||||
|
@ -2,3 +2,4 @@ update-package-versioning-for-TIS-format.patch
|
||||
Protect-sections-of-systemd-post-from-running-on-pat.patch
|
||||
spec-millisec-in-syslog-date.patch
|
||||
fix-build-error-for-unused-variable.patch
|
||||
fix-build-error-for-CentOS76.patch
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 0816ac70222fec2609ed893c30d55f8c37fba632 Mon Sep 17 00:00:00 2001
|
||||
From: Shuicheng Lin <shuicheng.lin@intel.com>
|
||||
Date: Tue, 8 Jan 2019 21:06:06 +0800
|
||||
Subject: [PATCH] Add patch to fix build failure in CentOS 7.6
|
||||
|
||||
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
|
||||
---
|
||||
SPECS/systemd.spec | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec
|
||||
index f794c3b..8e3715b 100644
|
||||
--- a/SPECS/systemd.spec
|
||||
+++ b/SPECS/systemd.spec
|
||||
@@ -707,6 +707,7 @@ Patch0664: 0664-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch
|
||||
#WRS Patches
|
||||
Patch0701: 0701-inject-millisec-in-syslog-date.patch
|
||||
Patch0702: 0702-fix-build-error-for-unused-variable.patch
|
||||
+Patch0703: 0703-fix-build-error-for-CentOS7.6.patch
|
||||
|
||||
%global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);}
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -0,0 +1,68 @@
|
||||
From 424bb6c3f56f6c445b7bd3d06150ab2993f1b611 Mon Sep 17 00:00:00 2001
|
||||
From: Shuicheng Lin <shuicheng.lin@intel.com>
|
||||
Date: Tue, 8 Jan 2019 20:59:43 +0800
|
||||
Subject: [PATCH] Fix compile failure due to deprecated value
|
||||
|
||||
Issue occur after upgrade build tool chain. Fix it per tool chain's
|
||||
suggestion.
|
||||
Error message is like below:
|
||||
"
|
||||
Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated,
|
||||
use MHD_HTTP_PAYLOAD_TOO_LARGE [-Werror]
|
||||
Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated,
|
||||
use MHD_HTTP_NOT_ACCEPTABLE [-Werror]
|
||||
"
|
||||
|
||||
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
|
||||
---
|
||||
src/journal-remote/journal-gatewayd.c | 4 ++--
|
||||
src/journal-remote/journal-remote.c | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c
|
||||
index d1f0ce3..8364044 100644
|
||||
--- a/src/journal-remote/journal-gatewayd.c
|
||||
+++ b/src/journal-remote/journal-gatewayd.c
|
||||
@@ -684,7 +684,7 @@ static int request_handler_file(
|
||||
if (fstat(fd, &st) < 0)
|
||||
return mhd_respondf(connection, MHD_HTTP_INTERNAL_SERVER_ERROR, "Failed to stat file: %m\n");
|
||||
|
||||
- response = MHD_create_response_from_fd_at_offset(st.st_size, fd, 0);
|
||||
+ response = MHD_create_response_from_fd_at_offset64(st.st_size, fd, 0);
|
||||
if (!response)
|
||||
return respond_oom(connection);
|
||||
|
||||
@@ -824,7 +824,7 @@ static int request_handler(
|
||||
assert(method);
|
||||
|
||||
if (!streq(method, "GET"))
|
||||
- return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
|
||||
+ return mhd_respond(connection, MHD_HTTP_NOT_ACCEPTABLE,
|
||||
"Unsupported method.\n");
|
||||
|
||||
|
||||
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
|
||||
index a455fb6..1d7df07 100644
|
||||
--- a/src/journal-remote/journal-remote.c
|
||||
+++ b/src/journal-remote/journal-remote.c
|
||||
@@ -526,7 +526,7 @@ static int process_http_upload(
|
||||
log_warning("Failed to process data for connection %p", connection);
|
||||
if (r == -E2BIG)
|
||||
return mhd_respondf(connection,
|
||||
- MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
|
||||
+ MHD_HTTP_PAYLOAD_TOO_LARGE,
|
||||
"Entry is too large, maximum is %u bytes.\n",
|
||||
DATA_SIZE_MAX);
|
||||
else
|
||||
@@ -579,7 +579,7 @@ static int request_handler(
|
||||
*connection_cls);
|
||||
|
||||
if (!streq(method, "POST"))
|
||||
- return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
|
||||
+ return mhd_respond(connection, MHD_HTTP_NOT_ACCEPTABLE,
|
||||
"Unsupported method.\n");
|
||||
|
||||
if (!streq(url, "/upload"))
|
||||
--
|
||||
2.7.4
|
||||
|
Loading…
Reference in New Issue
Block a user