[vlc-commits] configure: replace max_align_t (fixes #17387)

Rémi Denis-Courmont git at videolan.org
Wed Sep 14 10:27:20 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Sep 14 11:26:43 2016 +0300| [7f225e06741f07becf82c0e5e714d0f59d9e4419] | committer: Rémi Denis-Courmont

configure: replace max_align_t (fixes #17387)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7f225e06741f07becf82c0e5e714d0f59d9e4419
---

 configure.ac         | 4 ++++
 include/vlc_fixups.h | 8 ++++++++
 2 files changed, 12 insertions(+)

diff --git a/configure.ac b/configure.ac
index ae59594..8e91233 100644
--- a/configure.ac
+++ b/configure.ac
@@ -650,6 +650,10 @@ dnl Check for struct timespec
 AC_CHECK_TYPES([struct timespec],,,
 [#include <time.h>])
 
+dnl Check for max_align_t
+AC_CHECK_TYPES([max_align_t],,,
+[#include <stddef.h>])
+
 dnl Checks for socket stuff
 VLC_SAVE_FLAGS
 SOCKET_LIBS=""
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index a14764f..851e1ef 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -107,6 +107,14 @@ extern "C" {
 # define VLC_NOTHROW
 #endif
 
+/* stddef.h */
+#ifndef HAVE_MAX_ALIGN_T
+typedef struct {
+  long long ll;
+  long double ld;
+} max_align_t;
+#endif
+
 /* stdio.h */
 #ifndef HAVE_ASPRINTF
 int asprintf (char **, const char *, ...);



More information about the vlc-commits mailing list