Update tar.h to use MSVC-compatible struct packing

Fixes #3.
This commit is contained in:
apio 2023-01-08 12:47:09 +01:00
parent 087b099917
commit f2f4d4ddab
Signed by: apio
GPG Key ID: B8A7D06E42258954
2 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2022, apio
Copyright (c) 2022-2023, apio
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

View File

@ -3,6 +3,8 @@
// Format of a raw standard tar header.
#pragma pack(push, 1)
struct tar_header
{
char name[100];
@ -23,6 +25,8 @@ struct tar_header
char prefix[155];
char padding[12]; // Not part of the header, only used to make the structure 512 bytes
} __attribute__((packed));
};
#pragma pack(pop)
#endif