WiringX Serial sample code is not right

Hello, everybody.

There is erros in the following sample code…

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
#include <pthread.h>
#include “wiringX.h”
int fd=-1, c=0;
void *interrupt(void *param) {
while(1){
if(wiringXserialDataAvail (fd)>0){
c=wiringXserialGetchar(fd);
printf(“Data received is: %d.\n”, c);
sleep(1);
}
}
}
int main(void) {
pthread_t pth;
unsigned char d=0x00;
wiringXSetup();
pinMode(0, OUTPUT);
if ((fd = wiringXserialOpen ("/dev/ttyS0", 9600)) < 0) {
fprintf (stderr, “Unable to open serial device: %s\n”, strerror (errno)) ;
return -1;
}
pthread_create(&pth, NULL, interrupt, NULL);
wiringXserialPutchar(fd, d);
while(1){
digitalWrite(0, HIGH);
sleep(1);
digitalWrite(0, LOW);
sleep(1);
}
}

I have stumbled in this part
fprintf (stderr, “Unable to open serial device: %s\n”, strerror (errno);

it say “strerror” received in int argument and when I change the %s to %d it tells me to change “strerror” to “perror” and then it asks me for a const char* .

Other error were letter not capitalized in the function names (Serial not “serial”, Char not “char” and so on).