Skip to content

Commit

Permalink
fix build issues with GCC 13.1+
Browse files Browse the repository at this point in the history
upstream issue created: eProsima/Fast-DDS#3514
  • Loading branch information
kistlin committed May 12, 2023
1 parent 03aa29e commit b498025
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = eprosima-fast-dds
pkgdesc = eProsima's Fast-DDS implementation
pkgver = 2.10.1
pkgrel = 1
pkgrel = 2
url = https://github.com/eProsima/Fast-DDS
arch = x86_64
license = Apache
Expand All @@ -11,6 +11,8 @@ pkgbase = eprosima-fast-dds
depends = tinyxml2
depends = eprosima-fast-cdr
source = https://github.com/eProsima/Fast-DDS/archive/v2.10.1.tar.gz
source = 001-gcc-13-1.patch
sha256sums = 2cc2682db5dc7e87684b7f23166e2f32faf8d5c4b4a8c94c6c21211a8a38f553
sha256sums = d4e29cda89334ddadd6d619a18dfdfaaee184cd7df7ad09c2de1e2673b2a36cb

pkgname = eprosima-fast-dds
27 changes: 27 additions & 0 deletions 001-gcc-13-1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/include/fastdds/rtps/transport/TransportDescriptorInterface.h b/include/fastdds/rtps/transport/TransportDescriptorInterface.h
index 149707736..30184d71a 100644
--- a/include/fastdds/rtps/transport/TransportDescriptorInterface.h
+++ b/include/fastdds/rtps/transport/TransportDescriptorInterface.h
@@ -17,7 +17,7 @@

#include <fastrtps/fastrtps_dll.h>

-#ifdef _WIN32
+#if defined(_WIN32) || ((__GNUC__ >= 13) && (__GNUC_MINOR__ >= 1))
#include <cstdint>
#endif // ifdef _WIN32
#include <vector>
diff --git a/include/fastrtps/types/TypeNamesGenerator.h b/include/fastrtps/types/TypeNamesGenerator.h
index a8f45e013..152933316 100644
--- a/include/fastrtps/types/TypeNamesGenerator.h
+++ b/include/fastrtps/types/TypeNamesGenerator.h
@@ -3,6 +3,9 @@

#include <fastrtps/fastrtps_dll.h>

+#if defined(_WIN32) || ((__GNUC__ >= 13) && (__GNUC_MINOR__ >= 1))
+#include <cstdint>
+#endif // ifdef _WIN32
#include <string>
#include <vector>

19 changes: 15 additions & 4 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: Dennis van der Schagt <dennisschagt@gmail.com>
pkgname=eprosima-fast-dds
pkgver=2.10.1
pkgrel=1
pkgrel=2
pkgdesc="eProsima's Fast-DDS implementation"
arch=('x86_64')
url="https://github.com/eProsima/Fast-DDS"
Expand All @@ -17,17 +17,28 @@ backup=()
options=()
install=
changelog=
source=("https://github.com/eProsima/Fast-DDS/archive/v${pkgver}.tar.gz")
source=(
"https://github.com/eProsima/Fast-DDS/archive/v${pkgver}.tar.gz"
"001-gcc-13-1.patch"
)
noextract=()
sha256sums=('2cc2682db5dc7e87684b7f23166e2f32faf8d5c4b4a8c94c6c21211a8a38f553')
sha256sums=(
'2cc2682db5dc7e87684b7f23166e2f32faf8d5c4b4a8c94c6c21211a8a38f553'
'd4e29cda89334ddadd6d619a18dfdfaaee184cd7df7ad09c2de1e2673b2a36cb'
)
validpgpkeys=()

prepare() {
cd Fast-DDS-${pkgver}
patch --forward --strip=1 --input="${srcdir}/001-gcc-13-1.patch"
}

build() {
cd "Fast-DDS-$pkgver"
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
.
make -C build -j8
cmake --build build --parallel 8
}

package() {
Expand Down

0 comments on commit b498025

Please sign in to comment.