Skip to content

Commit f0b6039

Browse files
committed
options/internal: reorder and rename params of __MLIBC_FIELD_PADDED
1 parent 7a854fd commit f0b6039

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

options/ansi/include/bits/ansi/timespec.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct timespec {
1212
time_t tv_sec;
1313
// tv_nspec is required to be long by the C standard.
1414
// However linux kernel expects long long. So we add padding.
15-
__MLIBC_FIELD_PADDED(long, tv_nsec, long long);
15+
__MLIBC_FIELD_PADDED(long, long long, tv_nsec);
1616
};
1717

1818
#endif // MLIBC_TIMESPEC_H
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#ifndef MLIBC_FIELD_PADDING_H
22
#define MLIBC_FIELD_PADDING_H
33

4-
5-
#define __MLIBC_FIELD_PADDED(T, F, PT) \
6-
PT : (sizeof(PT)-sizeof(T))*8*(__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__); \
4+
#define __MLIBC_FIELD_PADDED(T, AT, F) \
5+
AT : (sizeof(AT)-sizeof(T))*8*(__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__); \
76
T F; \
8-
PT : (sizeof(PT)-sizeof(T))*8*(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
7+
AT : (sizeof(AT)-sizeof(T))*8*(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
98

109
#endif

0 commit comments

Comments
 (0)