Make vxi.h the first #include in all affected files and #undef the
_POSIX_C_SOURCE macro in vxi.h.
This avoids various build issues on e.g. FreeBSD or Mac OS X where
setting _POSIX_C_SOURCE leads to the unavailability of certain types
such as u_long (as used in the VXI/RPC code).
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "vxi.h"
#include <rpc/rpc.h>
#include <string.h>
-#include "vxi.h"
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
#include "scpi.h"
* It was generated using rpcgen.
*/
+#undef _POSIX_C_SOURCE
+
#ifndef _VXI_H_RPCGEN
#define _VXI_H_RPCGEN
* It was generated using rpcgen.
*/
-#include <memory.h> /* for memset */
#include "vxi.h"
+#include <memory.h> /* for memset */
/* Default timeout can be changed using clnt_control() */
static struct timeval TIMEOUT = { 25, 0 };