Skip to content

Commit

Permalink
Fix ENODATA error on FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
krwq authored May 9, 2020
1 parent 8d2695a commit cd61959
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libraries/Native/Unix/System.IO.Ports.Native/pal_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
#include <stdlib.h>
#include <sys/socket.h>

// ENODATA is not defined in FreeBSD 10.3 but is defined in 11.0
#if defined(__FreeBSD__) & !defined(ENODATA)
#define ENODATA ENOATTR
#endif

/* Open device file in non-blocking mode and without controlling terminal */
intptr_t SystemIoPortsNative_SerialPortOpen(const char * name)
{
Expand Down

0 comments on commit cd61959

Please sign in to comment.