Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
0137e2a2
Commit
0137e2a2
authored
Apr 29, 2011
by
Davi Arnaut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIONREAD is located in sys/filio.h on Solaris.
parent
32cc7d19
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
config.h.cmake
config.h.cmake
+1
-0
configure.cmake
configure.cmake
+1
-0
vio/viosocket.c
vio/viosocket.c
+6
-2
No files found.
config.h.cmake
View file @
0137e2a2
...
...
@@ -125,6 +125,7 @@
#cmakedefine FIONREAD_IN_SYS_IOCTL 1
#cmakedefine GWINSZ_IN_SYS_IOCTL 1
#cmakedefine TIOCSTAT_IN_SYS_IOCTL 1
#cmakedefine FIONREAD_IN_SYS_FILIO 1
/* Functions we may want to use. */
#cmakedefine HAVE_AIOWAIT 1
...
...
configure.cmake
View file @
0137e2a2
...
...
@@ -487,6 +487,7 @@ CHECK_SYMBOL_EXISTS(getpagesize "unistd.h" HAVE_GETPAGESIZE)
CHECK_SYMBOL_EXISTS
(
TIOCGWINSZ
"sys/ioctl.h"
GWINSZ_IN_SYS_IOCTL
)
CHECK_SYMBOL_EXISTS
(
FIONREAD
"sys/ioctl.h"
FIONREAD_IN_SYS_IOCTL
)
CHECK_SYMBOL_EXISTS
(
TIOCSTAT
"sys/ioctl.h"
TIOCSTAT_IN_SYS_IOCTL
)
CHECK_SYMBOL_EXISTS
(
FIONREAD
"sys/filio.h"
FIONREAD_IN_SYS_FILIO
)
CHECK_SYMBOL_EXISTS
(
gettimeofday
"sys/time.h"
HAVE_GETTIMEOFDAY
)
CHECK_SYMBOL_EXISTS
(
finite
"math.h"
HAVE_FINITE_IN_MATH_H
)
...
...
vio/viosocket.c
View file @
0137e2a2
...
...
@@ -22,6 +22,10 @@
#include "vio_priv.h"
#ifdef FIONREAD_IN_SYS_FILIO
# include <sys/filio.h>
#endif
int
vio_errno
(
Vio
*
vio
__attribute__
((
unused
)))
{
return
socket_errno
;
/* On Win32 this mapped to WSAGetLastError() */
...
...
@@ -583,13 +587,13 @@ static my_bool socket_poll_read(my_socket sd, uint timeout)
static
my_bool
socket_peek_read
(
Vio
*
vio
,
uint
*
bytes
)
{
#if
def __WIN__
#if
defined(_WIN32)
int
len
;
if
(
ioctlsocket
(
vio
->
sd
,
FIONREAD
,
&
len
))
return
TRUE
;
*
bytes
=
len
;
return
FALSE
;
#elif
FIONREAD_IN_SYS_IOCTL
#elif
defined(FIONREAD_IN_SYS_IOCTL) || defined(FIONREAD_IN_SYS_FILIO)
int
len
;
if
(
ioctl
(
vio
->
sd
,
FIONREAD
,
&
len
)
<
0
)
return
TRUE
;
...
...
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