Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F3113358
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
cem
Jan 10 2018, 12:52 AM
2018-01-10 00:52:45 (UTC+0)
Size
571 B
Referenced Files
None
Subscribers
None
View Options
--- freebsd/zstd_kfreebsd.h (revision 327712)
+++ freebsd/zstd_kfreebsd.h (working copy)
@@ -49,6 +49,25 @@
#define calloc(a,b) (malloc)((a)*(b), M_ZSTD, M_WAITOK | M_ZERO)
#endif
+#undef __builtin_ctz
+#undef __builtin_ctzll
+
+static inline int
+__builtin_ctz(int x)
+{
+ if (x == 0)
+ return (sizeof(x) * NBBY);
+ return (ffs(x) - 1);
+}
+
+static inline long long
+__builtin_ctzll(long long x)
+{
+ if (x == 0)
+ return (sizeof(x) * NBBY);
+ return (ffsll(x) - 1);
+}
+
#ifdef __cplusplus
}
#endif
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1252861
Default Alt Text
(571 B)
Attached To
Mode
P157 (An Untitled Masterwork)
Attached
Detach File
Event Timeline
Log In to Comment