diff options
author | Ruslan Bukin ext:(%2C%20Zhang%20Guoye) <br@bsdpad.com> | 2015-06-07 14:02:40 -0500 |
---|---|---|
committer | Ruslan Bukin ext:(%2C%20Zhang%20Guoye) <br@bsdpad.com> | 2015-06-07 14:02:40 -0500 |
commit | 736d3314bff0f3457ee9c86989a2942f4fbce510 (patch) | |
tree | b5346ed1a4a778f03797952781c41f0a24d80c0f /src/arch | |
parent | 4a174947083b59cd76561ec0c41f23a95697b822 (diff) | |
download | gem5-736d3314bff0f3457ee9c86989a2942f4fbce510.tar.xz |
arch: fix build under MacOSX
put O_DIRECT under ifdefs -- this fixes build for MacOSX.
Also use correct class for arm64 openFlagTable.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/arm/freebsd/freebsd.cc | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/arch/arm/freebsd/freebsd.cc b/src/arch/arm/freebsd/freebsd.cc index feee5686f..bb8514e96 100644 --- a/src/arch/arm/freebsd/freebsd.cc +++ b/src/arch/arm/freebsd/freebsd.cc @@ -47,7 +47,9 @@ OpenFlagTransTable ArmFreebsd32::openFlagTable[] = { { ArmFreebsd32::TGT_O_NONBLOCK, O_NONBLOCK }, { ArmFreebsd32::TGT_O_SYNC, O_SYNC }, { ArmFreebsd32::TGT_FASYNC, FASYNC }, +#ifdef O_DIRECT { ArmFreebsd32::TGT_O_DIRECT, O_DIRECT }, +#endif { ArmFreebsd32::TGT_O_DIRECTORY, O_DIRECTORY }, { ArmFreebsd32::TGT_O_NOFOLLOW, O_NOFOLLOW }, }; @@ -57,20 +59,22 @@ const int ArmFreebsd32::NUM_OPEN_FLAGS = sizeof(ArmFreebsd32::openFlagTable) / // open(2) flags translation table OpenFlagTransTable ArmFreebsd64::openFlagTable[] = { - { ArmFreebsd32::TGT_O_RDONLY, O_RDONLY }, - { ArmFreebsd32::TGT_O_WRONLY, O_WRONLY }, - { ArmFreebsd32::TGT_O_RDWR, O_RDWR }, - { ArmFreebsd32::TGT_O_CREAT, O_CREAT }, - { ArmFreebsd32::TGT_O_EXCL, O_EXCL }, - { ArmFreebsd32::TGT_O_NOCTTY, O_NOCTTY }, - { ArmFreebsd32::TGT_O_TRUNC, O_TRUNC }, - { ArmFreebsd32::TGT_O_APPEND, O_APPEND }, - { ArmFreebsd32::TGT_O_NONBLOCK, O_NONBLOCK }, - { ArmFreebsd32::TGT_O_SYNC, O_SYNC }, - { ArmFreebsd32::TGT_FASYNC, FASYNC }, - { ArmFreebsd32::TGT_O_DIRECT, O_DIRECT }, - { ArmFreebsd32::TGT_O_DIRECTORY, O_DIRECTORY }, - { ArmFreebsd32::TGT_O_NOFOLLOW, O_NOFOLLOW }, + { ArmFreebsd64::TGT_O_RDONLY, O_RDONLY }, + { ArmFreebsd64::TGT_O_WRONLY, O_WRONLY }, + { ArmFreebsd64::TGT_O_RDWR, O_RDWR }, + { ArmFreebsd64::TGT_O_CREAT, O_CREAT }, + { ArmFreebsd64::TGT_O_EXCL, O_EXCL }, + { ArmFreebsd64::TGT_O_NOCTTY, O_NOCTTY }, + { ArmFreebsd64::TGT_O_TRUNC, O_TRUNC }, + { ArmFreebsd64::TGT_O_APPEND, O_APPEND }, + { ArmFreebsd64::TGT_O_NONBLOCK, O_NONBLOCK }, + { ArmFreebsd64::TGT_O_SYNC, O_SYNC }, + { ArmFreebsd64::TGT_FASYNC, FASYNC }, +#ifdef O_DIRECT + { ArmFreebsd64::TGT_O_DIRECT, O_DIRECT }, +#endif + { ArmFreebsd64::TGT_O_DIRECTORY, O_DIRECTORY }, + { ArmFreebsd64::TGT_O_NOFOLLOW, O_NOFOLLOW }, }; const int ArmFreebsd64::NUM_OPEN_FLAGS = sizeof(ArmFreebsd64::openFlagTable) / |