From 750e1c41e97cd9b53da3f6a64938c528951d358b Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Sat, 20 Feb 2016 13:40:01 -0500 Subject: Include what you use --- src/encoding.cc | 1 + src/operations.cc | 5 +---- src/posix_extras.cc | 4 ++-- src/posix_extras.h | 1 - src/scoville.cc | 8 ++++++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/encoding.cc b/src/encoding.cc index 93773a6..620a821 100644 --- a/src/encoding.cc +++ b/src/encoding.cc @@ -16,6 +16,7 @@ #include #include +#include #include #include diff --git a/src/operations.cc b/src/operations.cc index a69b591..326f2a5 100644 --- a/src/operations.cc +++ b/src/operations.cc @@ -15,12 +15,10 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#define BSD_SOURCE -#define _POSIX_C_SOURCE 201602L - #include "operations.h" #include +#include #include #include #include @@ -33,7 +31,6 @@ #include #include #include -#include #include "posix_extras.h" diff --git a/src/posix_extras.cc b/src/posix_extras.cc index 07b459e..6013b9b 100644 --- a/src/posix_extras.cc +++ b/src/posix_extras.cc @@ -12,8 +12,7 @@ // License for the specific language governing permissions and limitations under // the License. -#define _BSD_SOURCE 1 -#define _POSIX_C_SOURCE 201502L +#define _XOPEN_SOURCE 700 #undef _GNU_SOURCE #include "posix_extras.h" @@ -21,6 +20,7 @@ #include #include #include +#include #include #include diff --git a/src/posix_extras.h b/src/posix_extras.h index 9aea47d..840b448 100644 --- a/src/posix_extras.h +++ b/src/posix_extras.h @@ -23,7 +23,6 @@ #include #include #include -#include namespace scoville { diff --git a/src/scoville.cc b/src/scoville.cc index b572b5f..78a29ae 100644 --- a/src/scoville.cc +++ b/src/scoville.cc @@ -14,9 +14,11 @@ // You should have received a copy of the GNU General Public License along with // this program. If not, see . -#include #include +#define FUSE_USE_VERSION 26 +#include +#include #include #include @@ -33,7 +35,9 @@ int main(int argc, char* argv[]) { google::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); - // Open an FD to the underlying file system so we can still do operations on + // This is an overlay file system, which means once we start FUSE, the + // underlying file system will be inaccessible through normal means. Open a + // file descriptor to the underlying root now so we can still do operations on // it while it's overlayed. std::unique_ptr root; const char* const root_path = argv[argc - 1]; -- cgit v1.2.3