This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: The function ioctl bug
- From: ÐÐÐÐÐÐÐ ÐÑÑÐÑÐÐÐ <nikkybox at yandex dot ru>
- To: cygwin at cygwin dot com
- Date: Fri, 01 Jul 2016 23:38:08 +1000
- Subject: Re: The function ioctl bug
- Authentication-results: sourceware.org; auth=none
- Authentication-results: mxback5j.mail.yandex.net; dkim=pass header dot i= at yandex dot ru
Dear friends!
The function ioctl return -1 (errno equal 95) if I use cygwin-x86_64 but return 0 if I use cygwin-x86.
#include <stdio.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <errno.h>
int main()
{
int c;
int fd = socket(AF_INET, SOCK_STREAM, 0);
if (ioctl(fd, FIONREAD, &c) == -1)
printf("errno:%u\n", errno);
close(fd);
return 0;
}
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple