obdev / v-usb

A Firmware-Only USB implementation for Atmel's AVR Microcontrollers
1.21k stars 243 forks source link

Build fails on linux, no srandomdev() #11

Open M-a-r-k opened 7 years ago

M-a-r-k commented 7 years ago

Building on Linux (x86-64) fails. It looks like srandomdev() doesn't exist on Linux?

make[2]: Entering directory '/home/mark/Work/v-usb/examples/drivertest/commandline'
gcc  `libusb-config --cflags` -O -g -Wall -c opendevice.c
gcc  `libusb-config --cflags` -O -g -Wall -c runtest.c
runtest.c: In function ‘main’:
runtest.c:114:9: warning: implicit declaration of function ‘srandomdev’ [-Wimplicit-function-declaration]
         srandomdev();
         ^~~~~~~~~~
gcc -o runtest opendevice.o runtest.o `libusb-config --libs`
runtest.o: In function `main':
/home/mark/Work/v-usb/examples/drivertest/commandline/runtest.c:114: undefined reference to `srandomdev'
collect2: error: ld returned 1 exit status
Makefile:41: recipe for target 'runtest' failed
make[2]: *** [runtest] Error 1
make[2]: Leaving directory '/home/mark/Work/v-usb/examples/drivertest/commandline'
make[1]: Leaving directory '/home/mark/Work/v-usb'
starkjohann commented 7 years ago

You can simply remove this line if you want to run the tests on Linux.

tickelton commented 4 years ago

This issue can probably get closed as it should be fixed by 981b2858f7bd35d7ff2e3a5c6251c4ae98924fbf.