Tarsnap / tarsnap

Command-line client code for Tarsnap.
https://tarsnap.com
Other
871 stars 60 forks source link

Add major/minor headers in tar/util.c #469

Closed AlexAltea closed 3 years ago

AlexAltea commented 3 years ago

Otherwise I get the following in Ubuntu 20.04.2 LTS.

/usr/bin/ld: tar/tarsnap-util.o: in function `list_item_verbose':
util.c:(.text+0x198b): undefined reference to `minor'
/usr/bin/ld: util.c:(.text+0x19a6): undefined reference to `major'
AlexAltea commented 3 years ago

And another note, these same headers are defined here but seem unnecessary since no major/minor/makedev references appear: https://github.com/Tarsnap/tarsnap/blob/5f8295731a38c7935ac2fd6e37c05cfafa0154e8/tar/read.c

I kept them there just in case.

gperciva commented 3 years ago

Thanks, @AlexAltea! I can confirm the build breakage on ubuntu 20.04, which occurred due to f0e0935c0ff804d61eb63beb0d207f824a407318 a few days ago. Looks like it was a warning on 18.04, which is why the github action didn't error out.

Could you please remove those headers from read.c, and rebase the commits together?

AlexAltea commented 3 years ago

Done. I've also edited tar/util.c to use the more compact/readable form: #elif defined(...) from tar/read.c.

I haven't squashed the commits together (since I'm doing this from the web editor), but that can be done by maintainers directly from the GitHub UI: Drop down menu > Squash and merge.

gperciva commented 3 years ago

Ah, I didn't realize that it was via the web editor! Ok, thanks for the update. I've rebased it in #470, which also seems to have triggered the github actions.

cperciva commented 3 years ago

@AlexAltea Do you have a Tarsnap account?

AlexAltea commented 3 years ago

@AlexAltea Do you have a Tarsnap account?

No, I'm afraid not. I just submitted this PR to fix a build issue in a dependency of a dependency of a project I'm working on. :-)

cperciva commented 3 years ago

Sounds interesting!

If you ever decide to try out Tarsnap, there's a bug bounty waiting for you. :-)