Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
a9ed7f3d
Commit
a9ed7f3d
authored
May 16, 2010
by
dermiste
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
portability fixes
parent
41a83435
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
6 deletions
+14
-6
babeld.c
babeld.c
+1
-1
babeld.h
babeld.h
+8
-0
config.c
config.c
+2
-2
kernel.c
kernel.c
+3
-3
No files found.
babeld.c
View file @
a9ed7f3d
...
...
@@ -111,7 +111,7 @@ main(int argc, char **argv)
gettime
(
&
now
);
rfd
=
open
(
"/dev/urandom"
,
O_RDONLY
);
rfd
=
open
(
RND_DEV
,
O_RDONLY
);
if
(
rfd
<
0
)
{
perror
(
"open(random)"
);
}
else
{
...
...
babeld.h
View file @
a9ed7f3d
...
...
@@ -80,6 +80,14 @@ THE SOFTWARE.
#endif
#endif
#if defined(__linux)
#define RND_DEV "/dev/urandom"
#elif defined(__OpenBSD__)
#define RND_DEV "/dev/arandom"
#else
#error "don't know which random device to use"
#endif
extern
struct
timeval
now
;
extern
int
debug
;
extern
time_t
reboot_time
;
...
...
config.c
View file @
a9ed7f3d
...
...
@@ -24,7 +24,7 @@ THE SOFTWARE.
#include <string.h>
#include <stdio.h>
#if
ndef __APPLE__
#if
def __linux
/* Defining it rather than including <linux/rtnetlink.h> because this
* implies <asm/types.h> on Linux 2.4 */
#define RTPROT_BOOT 3
/* Route installed during boot */
...
...
@@ -646,7 +646,7 @@ filter_match(struct filter *f, const unsigned char *id,
return
0
;
}
else
if
(
proto
==
RTPROT_BABEL_LOCAL
)
{
return
0
;
#if
ndef __APPLE__
#if
def __linux
}
else
if
(
proto
==
RTPROT_BOOT
)
{
return
0
;
#endif
...
...
kernel.c
View file @
a9ed7f3d
...
...
@@ -26,10 +26,10 @@ THE SOFTWARE.
#include "babeld.h"
#ifdef __APPLE__
#include "kernel_socket.c"
#else
#ifdef __linux
#include "kernel_netlink.c"
#else
#include "kernel_socket.c"
#endif
/* Like gettimeofday, but returns monotonic time. If POSIX clocks are not
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment