util: Add extern c to u_dynarray.h
authorThomas Helland <thomashelland90@gmail.com>
Sat, 3 Jun 2017 17:59:07 +0000 (19:59 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 7 Jun 2017 19:07:24 +0000 (21:07 +0200)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
src/util/u_dynarray.h

index ad3889a7c8019796ddffbd1d1d99a100f9d74ed0..e9109ccd2d1e3c82697083aa18cb72b58870db98 100644 (file)
 #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 */