mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
7003707: need to remove (some) system include files from the HotSpot header files
Move socket_available into os_linux.cpp to avoid inclusion of ioctl.h in os_linux.inline.hpp Reviewed-by: coleenp, stefank, ikrylov
This commit is contained in:
parent
7c3fda39e6
commit
156ee8c453
2 changed files with 10 additions and 11 deletions
|
@ -45,7 +45,6 @@
|
|||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <netdb.h>
|
||||
|
||||
inline void* os::thread_local_storage_at(int index) {
|
||||
|
@ -268,16 +267,6 @@ inline int os::sendto(int fd, char *buf, int len, int flags,
|
|||
RESTARTABLE_RETURN_INT(::sendto(fd, buf, len, (unsigned int) flags, to, tolen));
|
||||
}
|
||||
|
||||
inline int os::socket_available(int fd, jint *pbytes) {
|
||||
// Linux doc says EINTR not returned, unlike Solaris
|
||||
int ret = ::ioctl(fd, FIONREAD, pbytes);
|
||||
|
||||
//%% note ioctl can return 0 when successful, JVM_SocketAvailable
|
||||
// is expected to return 0 on failure and 1 on success to the jdk.
|
||||
return (ret < 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
inline int os::socket_shutdown(int fd, int howto){
|
||||
return ::shutdown(fd, howto);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue