# Compilation error in fdbbackup/FileDecoder.actor.cpp

**URL:** <https://forums.foundationdb.org/t/compilation-error-in-fdbbackup-filedecoder-actor-cpp/4266>\
**Category:** Development\
**Created:** [November 29, 2023, 10:30pm UTC](https://forums.foundationdb.org/t/compilation-error-in-fdbbackup-filedecoder-actor-cpp/4266 "2023-11-29T22:30:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![uvatbc](https://avatars.discourse-cdn.com/v4/letter/u/e274bd/32.png) [@uvatbc](https://forums.foundationdb.org/u/uvatbc)\
**Post date:** [November 29, 2023, 10:30pm UTC](https://forums.foundationdb.org/t/compilation-error-in-fdbbackup-filedecoder-actor-cpp/4266/1 "2023-11-29T22:30:12Z")

</div>

```auto
In file included from /usr/include/fcntl.h:314,
                 from /tmp/src/foundationdb/fdbbackup/FileDecoder.actor.cpp:28:
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/FileDecoder.actor.cpp:690:20:
/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:

```auto
diff --git a/fdbbackup/FileDecoder.actor.cpp b/fdbbackup/FileDecoder.actor.cpp
index e69a1d370..c819d4f46 100644
--- a/fdbbackup/FileDecoder.actor.cpp
+++ b/fdbbackup/FileDecoder.actor.cpp
@@ -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](https://github.com/uvatbc/foundationdb), 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?

Thanks.

Any pointers?

---

<div class="post-metadata">

**Author:** ![jzhou](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/jzhou/32/445_2.png) [@jzhou](https://forums.foundationdb.org/u/jzhou)\
**Post date:** [November 29, 2023, 11:03pm UTC](https://forums.foundationdb.org/t/compilation-error-in-fdbbackup-filedecoder-actor-cpp/4266/2 "2023-11-29T23:03:45Z")

</div>

Thanks! I’ve opened a [PR](https://github.com/apple/foundationdb/pull/11082) from your repo.

---

<div class="post-metadata">

**Author:** ![uvatbc](https://avatars.discourse-cdn.com/v4/letter/u/e274bd/32.png) [@uvatbc](https://forums.foundationdb.org/u/uvatbc)\
**Post date:** [November 30, 2023, 3:14pm UTC](https://forums.foundationdb.org/t/compilation-error-in-fdbbackup-filedecoder-actor-cpp/4266/3 "2023-11-30T15:14:19Z")

</div>

Thanks so much!  
Main compiles successfully now.
