patch: compile error on x86_64-linux (ubuntu-13.10)
Verfasst: Montag 17. Februar 2014, 23:34
> /usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:26: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
Code: Alles auswählen
diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp
index bc921b7..ca58cbf 100644
--- a/src/system/helpers.cpp
+++ b/src/system/helpers.cpp
@@ -84,7 +84,7 @@ void wakeup_hdd(const char *hdd_dir)
if(!check_dir(hdd_dir) && hdd_get_standby(hdd_dir)){
std::string wakeup_file = hdd_dir;
wakeup_file += "/.wakeup";
- int fd = open(wakeup_file.c_str(), O_SYNC | O_WRONLY | O_CREAT | O_TRUNC);
+ int fd = open(wakeup_file.c_str(), O_SYNC | O_WRONLY | O_CREAT | O_TRUNC, 0x444);
if (fd >= 0) {
unsigned char buf[512];
memset(buf, 0xFF, sizeof(buf));