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
9e5e9603
Commit
9e5e9603
authored
Sep 15, 2005
by
stewart@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#13136 NdbTCP.cpp compile failure on OSX 10.2
use select if poll is unavailable.
parent
ee392534
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
ndb/src/common/portlib/NdbTCP.cpp
ndb/src/common/portlib/NdbTCP.cpp
+32
-0
ndb/src/common/portlib/win32/NdbTCP.c
ndb/src/common/portlib/win32/NdbTCP.c
+1
-1
No files found.
ndb/src/common/portlib/NdbTCP.cpp
View file @
9e5e9603
...
@@ -86,6 +86,7 @@ Ndb_getInAddr(struct in_addr * dst, const char *address) {
...
@@ -86,6 +86,7 @@ Ndb_getInAddr(struct in_addr * dst, const char *address) {
int
Ndb_check_socket_hup
(
NDB_SOCKET_TYPE
sock
)
int
Ndb_check_socket_hup
(
NDB_SOCKET_TYPE
sock
)
{
{
#ifdef HAVE_POLL
struct
pollfd
pfd
[
1
];
struct
pollfd
pfd
[
1
];
int
r
;
int
r
;
...
@@ -97,4 +98,35 @@ int Ndb_check_socket_hup(NDB_SOCKET_TYPE sock)
...
@@ -97,4 +98,35 @@ int Ndb_check_socket_hup(NDB_SOCKET_TYPE sock)
return
1
;
return
1
;
return
0
;
return
0
;
#else
/* HAVE_POLL */
fd_set
readfds
,
writefds
,
errorfds
;
struct
timeval
tv
=
{
0
,
0
};
int
s_err
;
int
s_err_size
=
sizeof
(
s_err
);
FD_ZERO
(
&
readfds
);
FD_ZERO
(
&
writefds
);
FD_ZERO
(
&
errorfds
);
FD_SET
(
sock
,
&
readfds
);
FD_SET
(
sock
,
&
writefds
);
FD_SET
(
sock
,
&
errorfds
);
if
(
select
(
1
,
&
readfds
,
&
writefds
,
&
errorfds
,
&
tv
)
<
0
)
return
1
;
if
(
FD_ISSET
(
sock
,
&
errorfds
))
return
1
;
s_err
=
0
;
if
(
getsockopt
(
sock
,
SOL_SOCKET
,
SO_ERROR
,
(
char
*
)
&
s_err
,
&
s_err_size
)
!=
0
)
return
(
1
);
if
(
s_err
)
{
/* getsockopt could succeed */
return
(
1
);
/* but return an error... */
}
return
0
;
#endif
/* HAVE_POLL */
}
}
ndb/src/common/portlib/win32/NdbTCP.c
View file @
9e5e9603
...
@@ -52,7 +52,7 @@ int Ndb_check_socket_hup(NDB_SOCKET_TYPE sock)
...
@@ -52,7 +52,7 @@ int Ndb_check_socket_hup(NDB_SOCKET_TYPE sock)
FD_SET
(
sock
,
&
writefds
);
FD_SET
(
sock
,
&
writefds
);
FD_SET
(
sock
,
&
errorfds
);
FD_SET
(
sock
,
&
errorfds
);
if
(
select
(
1
,
&
readfds
,
&
writefds
,
&
errorfds
,
&
t
)
==
SOCKET_ERROR
)
if
(
select
(
1
,
&
readfds
,
&
writefds
,
&
errorfds
,
&
t
v
)
==
SOCKET_ERROR
)
return
1
;
return
1
;
if
(
FD_ISSET
(
sock
,
&
errorfds
))
if
(
FD_ISSET
(
sock
,
&
errorfds
))
...
...
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