Should now work correctly on Arch, or other systems that install gpio as
/usr/bin/gpio.
# define FALSE (1==2)
#endif
# define FALSE (1==2)
#endif
#define I2CDETECT "/usr/sbin/i2cdetect"
int wpMode ;
#define I2CDETECT "/usr/sbin/i2cdetect"
int wpMode ;
if (pid == 0) // Child, exec
{
if (pid == 0) // Child, exec
{
- if (access ("/usr/local/bin/gpio", X_OK))
+ /**/ if (access ("/usr/local/bin/gpio", X_OK) == 0)
{
execl ("/usr/local/bin/gpio", "gpio", "edge", pinS, modeS, (char *)NULL) ;
return wiringPiFailure (WPI_FATAL, "wiringPiISR: execl failed: %s\n", strerror (errno)) ;
}
{
execl ("/usr/local/bin/gpio", "gpio", "edge", pinS, modeS, (char *)NULL) ;
return wiringPiFailure (WPI_FATAL, "wiringPiISR: execl failed: %s\n", strerror (errno)) ;
}
- else if (access ("/usr/bin/gpio", X_OK))
+ else if (access ("/usr/bin/gpio", X_OK) == 0)
{
execl ("/usr/bin/gpio", "gpio", "edge", pinS, modeS, (char *)NULL) ;
return wiringPiFailure (WPI_FATAL, "wiringPiISR: execl failed: %s\n", strerror (errno)) ;
{
execl ("/usr/bin/gpio", "gpio", "edge", pinS, modeS, (char *)NULL) ;
return wiringPiFailure (WPI_FATAL, "wiringPiISR: execl failed: %s\n", strerror (errno)) ;