diff --git a/src/nacl/_lib/__init__.py b/src/nacl/_lib/__init__.py
index 582fd2614dd87a8f7a8c7c6f8cf40a97493c0f19..d8f787ecfe8bee6a4cf48695f048f14499533620 100644
--- a/src/nacl/_lib/__init__.py
+++ b/src/nacl/_lib/__init__.py
@@ -36,8 +36,10 @@ HEADERS = glob.glob(
 ffi = FFI()
 
 
-# Add all of our header files
-for header in HEADERS:
+# Add all of our header files, but sort first for consistency of the
+# hash that CFFI generates and uses in the .so filename (the order of
+# glob() results cannot be relied on)
+for header in sorted(HEADERS):
     with open(header, "r") as hfile:
         ffi.cdef(hfile.read())