avoid conflict with clang's header version.

This commit is contained in:
espie 2017-05-13 08:53:52 +00:00
parent 4ff272a347
commit 319fbcbafb

View File

@ -0,0 +1,35 @@
$OpenBSD: patch-src_mem_align_h,v 1.1 2017/05/13 08:53:52 espie Exp $
Index: src/mem/align.h
--- src/mem/align.h.orig
+++ src/mem/align.h
@@ -15,22 +15,13 @@
#ifndef _LIBP_ALIGN_H_
#define _LIBP_ALIGN_H_
-/*
- * a type with the most strict alignment requirements
- */
-union max_align
-{
- char c;
- short s;
- long l;
- int i;
- float f;
- double d;
- void * v;
- void (*q)(void);
-};
-
-typedef union max_align max_align_t;
+#ifndef __CLANG_MAX_ALIGN_T_DEFINED
+#define __CLANG_MAX_ALIGN_T_DEFINED
+typedef struct {
+ long long __max_align_ll __aligned(__alignof__(long long));
+ long double __max_align_ld __aligned(__alignof__(long double));
+} max_align_t;
+#endif
#endif