]> wimlib.net Git - wimlib/blobdiff - include/wimlib/util.h
Fix building on NetBSD
[wimlib] / include / wimlib / util.h
index 82fc5fb4e9640629a291837bdb2193fbdace6703..12b1b120a46ef0d1be9ee47e975ec1e928ced870 100644 (file)
@@ -26,6 +26,7 @@
 
 /* Round 'v' up to the next 'alignment'-byte aligned boundary.  'alignment' must
  * be a power of 2.  */
+#undef ALIGN   /* NetBSD <sys/param.h> defines this already */
 #define ALIGN(v, alignment)    (((v) + ((alignment) - 1)) & ~((alignment) - 1))
 
 /* Maximum number of bytes that can be allocated on the stack.
@@ -88,11 +89,15 @@ extern void *
 mempcpy(void *dst, const void *src, size_t n);
 #endif
 
+/**************************
+ * Random number generation
+ **************************/
+
 extern void
-randomize_byte_array(u8 *p, size_t n);
+get_random_bytes(void *p, size_t n);
 
 extern void
-randomize_char_array_with_alnum(tchar *p, size_t n);
+get_random_alnum_chars(tchar *p, size_t n);
 
 /************************
  * Hashing and comparison