andrebdo / wireshark-cc2531

Wireshark extcap interface for the TI CC2531 USB dongle
GNU General Public License v2.0
23 stars 12 forks source link

Compile errors ‘readdir_r’ is deprecated #1

Closed basti85 closed 4 years ago

basti85 commented 4 years ago

Hi,

I can't get it to compile (Linux Mint 19.1 Cinnamon):

:~/Dokumente/1_Sourcecodes/wireshark-cc2531$ sh build.sh 
+ gcc -O2 -Wall -o cc2531 cc2531.c -s
cc2531.c: In function ‘cc2531_open’:
cc2531.c:94:9: warning: ‘readdir_r’ is deprecated [-Wdeprecated-declarations]
         while (readdir_r(dir1, &e, &r) == 0 && r != NULL) {
         ^~~~~
In file included from cc2531.c:33:0:
/usr/include/dirent.h:183:12: note: declared here
 extern int readdir_r (DIR *__restrict __dirp,
            ^~~~~~~~~
cc2531.c:103:21: warning: ‘readdir_r’ is deprecated [-Wdeprecated-declarations]
                     while (readdir_r(dir2, &e, &r) == 0 && r != NULL) {
                     ^~~~~
In file included from cc2531.c:33:0:
/usr/include/dirent.h:183:12: note: declared here
 extern int readdir_r (DIR *__restrict __dirp,
            ^~~~~~~~~

Any help?

Thanks a lot :) basti

andrebdo commented 4 years ago

That is not a compiler error, it is a compiler warning. You will notice that your compiler has successfully generated the cc2531 executable file.