Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
3585accf
Commit
3585accf
authored
Nov 08, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Linux: use accept4 if available (glibc 2.10)
parent
303fbc7c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
configure.ac
configure.ac
+1
-1
src/network/httpd.c
src/network/httpd.c
+4
-0
src/network/tcp.c
src/network/tcp.c
+7
-0
No files found.
configure.ac
View file @
3585accf
...
@@ -583,7 +583,7 @@ AC_CHECK_FUNCS(fdatasync,,
...
@@ -583,7 +583,7 @@ AC_CHECK_FUNCS(fdatasync,,
])
])
dnl Check for non-standard system calls
dnl Check for non-standard system calls
AC_CHECK_FUNCS([vmsplice eventfd fstatfs])
AC_CHECK_FUNCS([vmsplice eventfd fstatfs
accept4
])
AH_BOTTOM([#include <vlc_fixups.h>])
AH_BOTTOM([#include <vlc_fixups.h>])
...
...
src/network/httpd.c
View file @
3585accf
...
@@ -2517,6 +2517,10 @@ static void* httpd_HostThread( void *data )
...
@@ -2517,6 +2517,10 @@ static void* httpd_HostThread( void *data )
continue
;
continue
;
/* */
/* */
#ifdef HAVE_ACCEPT4
fd
=
accept4
(
fd
,
NULL
,
NULL
,
SOCK_CLOEXEC
);
if
(
fd
==
-
1
&&
errno
==
ENOSYS
)
#endif
fd
=
accept
(
fd
,
NULL
,
NULL
);
fd
=
accept
(
fd
,
NULL
,
NULL
);
if
(
fd
==
-
1
)
if
(
fd
==
-
1
)
continue
;
continue
;
...
...
src/network/tcp.c
View file @
3585accf
...
@@ -255,8 +255,15 @@ next_ai: /* failure */
...
@@ -255,8 +255,15 @@ next_ai: /* failure */
int
net_AcceptSingle
(
vlc_object_t
*
obj
,
int
lfd
)
int
net_AcceptSingle
(
vlc_object_t
*
obj
,
int
lfd
)
{
{
int
fd
;
int
fd
;
do
do
{
#ifdef HAVE_ACCEPT4
fd
=
accept4
(
lfd
,
NULL
,
NULL
,
SOCK_CLOEXEC
);
if
(
fd
==
-
1
&&
errno
==
ENOSYS
)
#endif
fd
=
accept
(
lfd
,
NULL
,
NULL
);
fd
=
accept
(
lfd
,
NULL
,
NULL
);
}
while
(
fd
==
-
1
&&
errno
==
EINTR
);
while
(
fd
==
-
1
&&
errno
==
EINTR
);
if
(
fd
==
-
1
)
if
(
fd
==
-
1
)
...
...
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