projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
procd: Don't use syslog before its initialization
[project/procd.git]
/
utils
/
utils.c
diff --git
a/utils/utils.c
b/utils/utils.c
index
ebf5447
..
e239eda
100644
(file)
--- a/
utils/utils.c
+++ b/
utils/utils.c
@@
-12,6
+12,7
@@
* GNU General Public License for more details.
*/
* GNU General Public License for more details.
*/
+#define _GNU_SOURCE
#include <libubox/avl.h>
#include <libubox/avl-cmp.h>
#include "utils.h"
#include <libubox/avl.h>
#include <libubox/avl-cmp.h>
#include "utils.h"
@@
-25,6
+26,10
@@
#include "../log.h"
#include "../log.h"
+#ifndef O_PATH
+#define O_PATH 010000000
+#endif
+
void
__blobmsg_list_init(struct blobmsg_list *list, int offset, int len, blobmsg_list_cmp cmp)
{
void
__blobmsg_list_init(struct blobmsg_list *list, int offset, int len, blobmsg_list_cmp cmp)
{
@@
-165,7
+170,7
@@
int patch_fd(const char *device, int fd, int flags)
device = "/dev/null";
if (*device != '/') {
device = "/dev/null";
if (*device != '/') {
- dfd = open("/dev", O_
RDONL
Y);
+ dfd = open("/dev", O_
PATH|O_DIRECTOR
Y);
if (dfd < 0)
return -1;
if (dfd < 0)
return -1;