projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix "cast from pointer to integer of different size" warning on OpenBSD
[fio.git]
/
os
/
os-openbsd.h
diff --git
a/os/os-openbsd.h
b/os/os-openbsd.h
index 3343cbdfbb18384ded0d4cfe0b145216cbf27590..9c7092c8ef4908a682323b4065d18445430bc076 100644
(file)
--- a/
os/os-openbsd.h
+++ b/
os/os-openbsd.h
@@
-22,6
+22,7
@@
#define FIO_USE_GENERIC_INIT_RANDOM_STATE
#define FIO_HAVE_FS_STAT
#define FIO_HAVE_GETTID
#define FIO_USE_GENERIC_INIT_RANDOM_STATE
#define FIO_HAVE_FS_STAT
#define FIO_HAVE_GETTID
+#define FIO_HAVE_SHM_ATTACH_REMOVED
#undef FIO_HAVE_CPU_AFFINITY /* XXX notyet */
#undef FIO_HAVE_CPU_AFFINITY /* XXX notyet */
@@
-52,7
+53,7
@@
static inline int blockdev_size(struct fio_file *f, unsigned long long *bytes)
static inline int blockdev_invalidate_cache(struct fio_file *f)
{
static inline int blockdev_invalidate_cache(struct fio_file *f)
{
- return E
INVAL
;
+ return E
NOTSUP
;
}
static inline unsigned long long os_phys_mem(void)
}
static inline unsigned long long os_phys_mem(void)
@@
-67,7
+68,7
@@
static inline unsigned long long os_phys_mem(void)
static inline int gettid(void)
{
static inline int gettid(void)
{
- return (int) pthread_self();
+ return (int)
(intptr_t)
pthread_self();
}
static inline unsigned long long get_fs_free_size(const char *path)
}
static inline unsigned long long get_fs_free_size(const char *path)
@@
-87,4
+88,12
@@
static inline unsigned long long get_fs_free_size(const char *path)
#define FIO_MADV_FREE MADV_FREE
#endif
#define FIO_MADV_FREE MADV_FREE
#endif
+static inline int shm_attach_to_open_removed(void)
+{
+ /*
+ * XXX: Return 1 if >= OpenBSD 5.1 according to 97900ebf.
+ */
+ return 0;
+}
+
#endif
#endif