gen: Add EXT_vertex_attrib_64bit.xml to dependency lists
[mesa.git] / src / mapi / glapi / glapi_entrypoint.c
index 53104ce5e58ab7bbb2b5d405a15b38f86d1b1313..f1f7f5e5955a9edbbe52af630fcb59127d4b2c4e 100644 (file)
@@ -29,6 +29,9 @@
  */
 
 
+#include <string.h>
+
+#include "c11/threads.h"
 #include "glapi/glapi_priv.h"
 #include "u_execmem.h"
 
@@ -336,7 +339,7 @@ void
 init_glapi_relocs_once( void )
 {
 #if defined(HAVE_PTHREAD) || defined(GLX_USE_TLS)
-   static pthread_once_t once_control = PTHREAD_ONCE_INIT;
-   pthread_once( & once_control, init_glapi_relocs );
+   static once_flag flag = ONCE_FLAG_INIT;
+   call_once(&flag, init_glapi_relocs);
 #endif
 }