Hi there,
I am trying to build libserialport on a Windows 10 machine with MSYS2.
The ./autogen.sh and ./configure steps complete without errors.
When issuing the make command I get the following errors:
make all-am
CC serialport.lo
serialport.c: In function ‘sp_get_port_by_name’:
serialport.c:85:14: warning: implicit declaration of function ‘realpath’
[-Wimplicit-function-declaration]
char *res = realpath(portname, pathbuf);
^~~~~~~~
serialport.c:85:14: warning: initialization makes pointer from integer
without a cast [-Wint-conversion]
serialport.c: In function ‘sp_blocking_write’:
serialport.c:811:2: error: unknown type name ‘fd_set’
fd_set fds;
^~~~~~
serialport.c:821:3: warning: implicit declaration of function ‘timeradd’
[-Wimplicit-function-declaration]
timeradd(&start, &delta, &end);
^~~~~~~~
serialport.c:824:2: warning: implicit declaration of function ‘FD_ZERO’
[-Wimplicit-function-declaration]
FD_ZERO(&fds);
^~~~~~~
serialport.c:825:2: warning: implicit declaration of function ‘FD_SET’
[-Wimplicit-function-declaration]
FD_SET(port->fd, &fds);
^~~~~~
serialport.c:836:8: warning: implicit declaration of function ‘timercmp’
[-Wimplicit-function-declaration]
if (timercmp(&now, &end, >))
^~~~~~~~
serialport.c:836:29: error: expected expression before ‘>’ token
if (timercmp(&now, &end, >))
^
serialport.c:839:4: warning: implicit declaration of function ‘timersub’
[-Wimplicit-function-declaration]
timersub(&end, &now, &delta);
^~~~~~~~
serialport.c:841:12: warning: implicit declaration of function ‘select’
[-Wimplicit-function-declaration]
result = select(port->fd + 1, NULL, &fds, NULL, timeout_ms ? &delta :
NULL);
^~~~~~
serialport.c: In function ‘sp_blocking_read’:
serialport.c:1037:2: error: unknown type name ‘fd_set’
fd_set fds;
^~~~~~
serialport.c:1062:29: error: expected expression before ‘>’ token
if (timercmp(&now, &end, >))
^
serialport.c: In function ‘sp_blocking_read_next’:
serialport.c:1174:2: error: unknown type name ‘fd_set’
fd_set fds;
^~~~~~
serialport.c:1199:29: error: expected expression before ‘>’ token
if (timercmp(&now, &end, >))
^
serialport.c: In function ‘sp_output_waiting’:
serialport.c:1334:22: error: ‘TIOCOUTQ’ undeclared (first use in this
function)
if (ioctl(port->fd, TIOCOUTQ, &bytes_waiting) < 0)
^~~~~~~~
serialport.c:1334:22: note: each undeclared identifier is reported only
once for each function it appears in
serialport.c: In function ‘sp_wait’:
serialport.c:1502:29: error: expected expression before ‘>’ token
if (timercmp(&now, &end, >)) {
^
serialport.c:1507:57: error: expected expression before ‘>’ token
if ((timeout_overflow = timercmp(&delta, &max_delta, >)))
^
make[1]: *** [Makefile:527: serialport.lo] Error 1
make: *** [Makefile:398: all] Error 2
How can I fix those errors?
Regards,
Giorgio
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel