Skip to content

Conversation

@AlexOwen
Copy link

When compiling it was failing with:

cc -O0 -g -Wall -Impt -DVERSION=\"1.3\"   -c -o mptevents.o mptevents.c
mptevents.c: In function ‘find_mptctl_device’:
mptevents.c:198:7: warning: implicit declaration of function ‘major’ [-Wimplicit-function-declaration]
   if (major(stbuf.st_rdev) == MISC_MAJOR_NUM &&
       ^~~~~
mptevents.c:199:6: warning: implicit declaration of function ‘minor’; did you mean ‘mknod’? [-Wimplicit-function-declaration]
     (minor(stbuf.st_rdev) == MPT2SAS_MINOR_NUM ||
      ^~~~~
      mknod
cc -O0 -g -Wall -Impt -DVERSION=\"1.3\"   -c -o mptparser.o mptparser.c
cc   mptevents.o mptparser.o   -o mptevents
/usr/bin/ld: mptevents.o: in function `find_mptctl_device':
/root/mptevents/mptevents.c:198: undefined reference to `major'
/usr/bin/ld: /root/mptevents/mptevents.c:199: undefined reference to `minor'
/usr/bin/ld: /root/mptevents/mptevents.c:200: undefined reference to `minor'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: mptevents] Error 1

This change fixes that.

When compiling it was failing with:

```
cc -O0 -g -Wall -Impt -DVERSION=\"1.3\"   -c -o mptevents.o mptevents.c
mptevents.c: In function ‘find_mptctl_device’:
mptevents.c:198:7: warning: implicit declaration of function ‘major’ [-Wimplicit-function-declaration]
   if (major(stbuf.st_rdev) == MISC_MAJOR_NUM &&
       ^~~~~
mptevents.c:199:6: warning: implicit declaration of function ‘minor’; did you mean ‘mknod’? [-Wimplicit-function-declaration]
     (minor(stbuf.st_rdev) == MPT2SAS_MINOR_NUM ||
      ^~~~~
      mknod
cc -O0 -g -Wall -Impt -DVERSION=\"1.3\"   -c -o mptparser.o mptparser.c
cc   mptevents.o mptparser.o   -o mptevents
/usr/bin/ld: mptevents.o: in function `find_mptctl_device':
/root/mptevents/mptevents.c:198: undefined reference to `major'
/usr/bin/ld: /root/mptevents/mptevents.c:199: undefined reference to `minor'
/usr/bin/ld: /root/mptevents/mptevents.c:200: undefined reference to `minor'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: mptevents] Error 1
```

This change fixes that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant