Use PyAPI_DATA.
diff --git a/Include/bytearrayobject.h b/Include/bytearrayobject.h
index 8702e5a..e1281a6 100644
--- a/Include/bytearrayobject.h
+++ b/Include/bytearrayobject.h
@@ -49,7 +49,7 @@
      Py_SIZE(self) ? ((PyByteArrayObject *)(self))->ob_bytes : _PyByteArray_empty_string)
 #define PyByteArray_GET_SIZE(self)  (assert(PyByteArray_Check(self)),Py_SIZE(self))
 
-extern char _PyByteArray_empty_string[];
+PyAPI_DATA(char) _PyByteArray_empty_string[];
 
 #ifdef __cplusplus
 }