Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
48fc82f9
Commit
48fc82f9
authored
May 15, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move ipv6supported from listen.c to utils.c
git-svn-id:
https://svn.musicpd.org/mpd/trunk@1026
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
12d3bd07
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
listen.c
src/listen.c
+1
-10
utils.c
src/utils.c
+13
-0
utils.h
src/utils.h
+2
-0
No files found.
src/listen.c
View file @
48fc82f9
...
...
@@ -20,6 +20,7 @@
#include "interface.h"
#include "conf.h"
#include "log.h"
#include "utils.h"
#include <unistd.h>
#include <stdio.h>
...
...
@@ -42,16 +43,6 @@
int
listenSocket
;
#ifdef HAVE_IPV6
int
ipv6Supported
()
{
int
s
;
s
=
socket
(
AF_INET6
,
SOCK_STREAM
,
0
);
if
(
s
==
-
1
)
return
0
;
close
(
s
);
return
1
;
}
#endif
int
establish
(
unsigned
short
port
)
{
int
allowReuse
=
ALLOW_REUSE
;
int
sock
;
...
...
src/utils.c
View file @
48fc82f9
...
...
@@ -22,6 +22,7 @@
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <sys/time.h>
#include <unistd.h>
...
...
@@ -57,4 +58,16 @@ void my_usleep(long usec) {
select
(
0
,
NULL
,
NULL
,
NULL
,
&
tv
);
}
int
ipv6Supported
()
{
#ifdef HAVE_IPV6
int
s
;
s
=
socket
(
AF_INET6
,
SOCK_STREAM
,
0
);
if
(
s
==
-
1
)
return
0
;
close
(
s
);
return
1
;
#endif
return
0
;
}
/* vim:set shiftwidth=4 tabstop=8 expandtab: */
src/utils.h
View file @
48fc82f9
...
...
@@ -31,5 +31,7 @@ void stripReturnChar(char * string);
void
my_usleep
(
long
usec
);
int
ipv6Supported
();
#endif
/* vim:set shiftwidth=4 tabstop=8 expandtab: */
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