Skip to content
Snippets Groups Projects
Commit 9064b2b5 authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Fix NetBSD build issue.

parent 53f875e7
No related branches found
No related tags found
No related merge requests found
......@@ -84,13 +84,19 @@ static void cleanup_old_device(struct config *config,
{
#if defined(__NetBSD__)
char *cleanup_command = NULL;
#ifdef DEBUG
int result;
#endif
asprintf(&cleanup_command,
"/sbin/ifconfig %s down delete > /dev/null 2>&1",
TUN_DEV);
DEBUGP("running: '%s'\n", cleanup_command);
#ifdef DEBUG
result = system(cleanup_command);
#else
system(cleanup_command);
#endif
DEBUGP("result: %d\n", result);
free(cleanup_command);
#endif /* defined(__NetBSD__) */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment