Created attachment 199030 [details]
patch file for the Port
Adding this compiler flags is necessary so that the pn532 module can be use over uart. With out this patch this is not possible as the necessary define for the serial baud rate is hidden in sys/_termios.h behind the __BSD_VISIBLE flag.
Every once a while, I come back to this issue, wonder how this should be done by the autotools, and get lots in the libnfc code.
After another attempt today, I can't see the problem this patch is supposed to fix.
pn532_uart....... yes <-------- What you are trying to fix
And the build complete successfully (this is on FreeBSD 12.0).
Can you please provide more details about your setup, what you are trying to do, how you do it and what is the result?
The problem is the the pn532 module is try to communicate at 115200 baud  but this baud is hide behind the __BSD_VISIBLE flag in sys/_termios.h. The problem dose not become visible at compile time but only at runtime as the library is not able to connect to any pn532 module using UART, because it can't set the necessary baud on the serial interface.
Here the preprocessor flag is used to enable the necessary speed for communication with the module, but this flag is not set unless the __BSD_VISIBLE is set as it is defined in sys/_termios.h in line 208 
Okay, I though it was a build failure. I guess the autotools should still do something magic that adds -D__BSD_VISIBLE somewhere, but this fix is straightforward.
I should have asked for details sooner, I was looking in the wrong direction.
Thank you for the details, I will commit your patch soon.
A commit references this bug:
Date: Fri Feb 22 02:13:45 UTC 2019
New revision: 493539
Fix pn532 module use over UART
Some macros are only visible if __BSD_VISIBLE is defined. When absent, libnfc
compiles successfuly, but some features are broken. This fix PN532 over UART.
Reported by: firstname.lastname@example.org
Sorry for the delay