aboutsummaryrefslogtreecommitdiff
path: root/graphics/mesa-dri
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/mesa-dri')
-rw-r--r--graphics/mesa-dri/Makefile.common4
-rw-r--r--graphics/mesa-dri/files/extra-patch-src_util_build__id.c15
2 files changed, 19 insertions, 0 deletions
diff --git a/graphics/mesa-dri/Makefile.common b/graphics/mesa-dri/Makefile.common
index 20931bf44980..36ba47ccbe30 100644
--- a/graphics/mesa-dri/Makefile.common
+++ b/graphics/mesa-dri/Makefile.common
@@ -81,6 +81,10 @@ PKGHELP= ${.CURDIR}/pkg-help
PKGINSTALL= ${.CURDIR}/pkg-install
PKGDEINSTALL= ${.CURDIR}/pkg-deinstall
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200000
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-src_util_build__id.c
+.endif
+
.include <bsd.port.pre.mk>
BINARY_ALIAS+= python3=${PYTHON_VERSION}
diff --git a/graphics/mesa-dri/files/extra-patch-src_util_build__id.c b/graphics/mesa-dri/files/extra-patch-src_util_build__id.c
new file mode 100644
index 000000000000..4b7b69d6b8ee
--- /dev/null
+++ b/graphics/mesa-dri/files/extra-patch-src_util_build__id.c
@@ -0,0 +1,15 @@
+# Elf_ doesn't exist, use Elf32_ or Elf64_
+#
+--- src/util/build_id.c.orig 2017-12-21 17:31:22 UTC
++++ src/util/build_id.c
+@@ -38,6 +38,10 @@
+ #define ElfW(type) Elf_##type
+ #endif
+
++#if defined(__FreeBSD__) && __FreeBSD__ < 12
++typedef Elf_Note Elf_Nhdr;
++#endif
++
+ struct build_id_note {
+ ElfW(Nhdr) nhdr;
+