diff mbox series

[meta-networking] drbd-utils: Fix build with gcc-15

Message ID 20250409091517.104863-1-thond2009@gmail.com
State Accepted
Headers show
Series [meta-networking] drbd-utils: Fix build with gcc-15 | expand

Commit Message

Nguyen Dat Tho April 9, 2025, 9:15 a.m. UTC
From: Nguyen Dat Tho <tho3.nguyen@lge.com>

To fix error: http://errors.yoctoproject.org/Errors/Details/851808/
In file included from string_matching.cpp:1:
./string_matching.h:10:18: error: 'uint16_t' does not name a type
   10 |     extern const uint16_t   PATTERN_LIMIT;
      |                  ^~~~~~~~
./string_matching.h:7:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'

Signed-off-by: Nguyen Dat Tho <tho3.nguyen@lge.com>
---
 .../0001-Fix-build-with-gcc-15.patch          | 34 +++++++++++++++++++
 .../recipes-support/drbd/drbd-utils_9.30.0.bb |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta-networking/recipes-support/drbd/drbd-utils/0001-Fix-build-with-gcc-15.patch
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/drbd/drbd-utils/0001-Fix-build-with-gcc-15.patch b/meta-networking/recipes-support/drbd/drbd-utils/0001-Fix-build-with-gcc-15.patch
new file mode 100644
index 0000000000..00105fb844
--- /dev/null
+++ b/meta-networking/recipes-support/drbd/drbd-utils/0001-Fix-build-with-gcc-15.patch
@@ -0,0 +1,34 @@ 
+From b42265af87d9efcc9aac91b3a3da3df5c5c66e29 Mon Sep 17 00:00:00 2001
+From: Nguyen Dat Tho <tho3.nguyen@lge.com>
+Date: Wed, 9 Apr 2025 17:33:25 +0900
+Subject: [PATCH] Fix build with gcc-15
+
+To fix the following error:
+In file included from string_matching.cpp:1:
+./string_matching.h:10:18: error: 'uint16_t' does not name a type
+   10 |     extern const uint16_t   PATTERN_LIMIT;
+      |                  ^~~~~~~~
+./string_matching.h:7:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
+
+Upstream-Status: Submitted [https://github.com/LINBIT/drbd-utils/pull/50]
+
+Signed-off-by: Nguyen Dat Tho <tho3.nguyen@lge.com>
+---
+ user/drbdmon/string_matching.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/user/drbdmon/string_matching.h b/user/drbdmon/string_matching.h
+index 9b3918fe..b783ba48 100644
+--- a/user/drbdmon/string_matching.h
++++ b/user/drbdmon/string_matching.h
+@@ -4,6 +4,7 @@
+ #include <string>
+ #include <memory>
+ #include <stdexcept>
++#include <cstdint>
+ 
+ namespace string_matching
+ {
+-- 
+2.34.1
+
diff --git a/meta-networking/recipes-support/drbd/drbd-utils_9.30.0.bb b/meta-networking/recipes-support/drbd/drbd-utils_9.30.0.bb
index d9f1ae3f77..ab515603f5 100644
--- a/meta-networking/recipes-support/drbd/drbd-utils_9.30.0.bb
+++ b/meta-networking/recipes-support/drbd/drbd-utils_9.30.0.bb
@@ -11,6 +11,7 @@  SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;prot
            git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \
            file://0001-drbdmon-add-LDFLAGS-when-linking.patch \
            ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \
+           file://0001-Fix-build-with-gcc-15.patch \
            "
 SRCREV_drbd-utils = "36ea199f38b543b2da92219109c2832e122e5bf9"
 SRCREV_drbd-headers = "94f4472513f351efba5788f783feba6ac6efe9fc"