Compilation error in fdbbackup/

In file included from /usr/include/fcntl.h:314,
                 from /tmp/src/foundationdb/fdbbackup/
In function ‘int open(const char*, int, ...)’,
    inlined from ‘int file_converter::DecodeRangeProgress::OpenFileImplActor1State<OpenFileImplActor1>::a_body1cont2(const int&, int) [with OpenFileImplActor1 = file_converter::DecodeRangeProgress::OpenFileImplActor1]’ at /tmp/src/foundationdb/fdbbackup/
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:31: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
   50 |           __open_missing_mode ();
      |           ~~~~~~~~~~~~~~~~~~~~^~
ninja: build stopped: subcommand failed.

Patch is very simple:

diff --git a/fdbbackup/ b/fdbbackup/
index e69a1d370..c819d4f46 100644
--- a/fdbbackup/
+++ b/fdbbackup/
@@ -687,7 +687,7 @@ public:

-                       self->lfd = open(self->file.fileName.c_str(), O_WRONLY | O_CREAT | O_TRUNC);
+                       self->lfd = open(self->file.fileName.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0600);
                        if (self->lfd == -1) {
                                TraceEvent(SevError, "OpenLocalFileFailed").detail("File", self->file.fileName);
                                throw platform_error();

I have the patch in GitHub - uvatbc/foundationdb: FoundationDB - the open source, distributed, transactional key-value store, but I cannot create a PR because I am not in the list of contributors.

Is there a contributor here who can take my patch and apply it to TOT?


Any pointers?

Thanks! I’ve opened a PR from your repo.

1 Like

Thanks so much!
Main compiles successfully now.