]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
include/ceph_fs.h: guard `#define CEPH_SETATTR_*` with #ifndef 10265/head
authorKefu Chai <kchai@redhat.com>
Tue, 12 Jul 2016 16:31:52 +0000 (00:31 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 13 Jul 2016 02:37:30 +0000 (10:37 +0800)
this silences the warnings like:

```
from
/srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-11.0.0-513-gfe98b0b/src/java/native/libcephfs_jni.cc:33:
warning:
/srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-11.0.0-513-gfe98b0b/src/include/ceph_fs.h:373:0:
"CEPH_SETATTR_MODE" redefined [enabled by default]
^
In file included from
/srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-11.0.0-513-gfe98b0b/src/java/native/libcephfs_jni.cc:32:0:
/srv/autobuild-ceph/gitbuilder.git/build/out~/ceph-11.0.0-513-gfe98b0b/src/include/cephfs/libcephfs.h:106:0:
note: this is the location of the previous definition
^
```

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/ceph_fs.h

index 45188ddb637857bbe4e10d35efaab128703b5cc1..90fc49a07c1ebde9cc3b3c40270c34c3f4585c79 100644 (file)
@@ -369,7 +369,7 @@ enum {
 
 extern const char *ceph_mds_op_name(int op);
 
-
+#ifndef CEPH_SETATTR_MODE
 #define CEPH_SETATTR_MODE      (1 << 0)
 #define CEPH_SETATTR_UID       (1 << 1)
 #define CEPH_SETATTR_GID       (1 << 2)
@@ -377,6 +377,7 @@ extern const char *ceph_mds_op_name(int op);
 #define CEPH_SETATTR_ATIME     (1 << 4)
 #define CEPH_SETATTR_SIZE      (1 << 5)
 #define CEPH_SETATTR_CTIME     (1 << 6)
+#endif
 #define CEPH_SETATTR_MTIME_NOW (1 << 7)
 #define CEPH_SETATTR_ATIME_NOW (1 << 8)