[Mesa-dev] [PATCH 7/7] util: Add extern c to u_dynarray.h

Thomas Helland thomashelland90 at gmail.com
Sat Jun 3 18:11:42 UTC 2017


---
 src/util/u_dynarray.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/util/u_dynarray.h b/src/util/u_dynarray.h
index ad3889a7c8..e9109ccd2d 100644
--- a/src/util/u_dynarray.h
+++ b/src/util/u_dynarray.h
@@ -30,6 +30,10 @@
 #include <stdlib.h>
 #include "ralloc.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* A zero-initialized version of this is guaranteed to represent an
  * empty array.
  *
@@ -134,5 +138,9 @@ util_dynarray_trim(struct util_dynarray *buf)
    for (type *elem = (type *)(buf)->data; \
         elem < (type *)((char *)(buf)->data + (buf)->size); elem++)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* U_DYNARRAY_H */
 
-- 
2.13.0



More information about the mesa-dev mailing list