Message ID | 1467131978-669-24-git-send-email-ynorov@caviumnetworks.com |
---|---|
State | New |
Headers | show |
On Tue, 28 Jun 2016, Yury Norov wrote: > aarch64 and ilp32 has different size of time_t. So to have common > layout for struct utmp and utmpx, corresponding headers are taken > from s390 port. You can't #include installed headers from other ports like this; it wouldn't work when using an installed library.
On Tue, Jun 28, 2016 at 05:18:04PM +0000, Joseph Myers wrote: > On Tue, 28 Jun 2016, Yury Norov wrote: > > > aarch64 and ilp32 has different size of time_t. So to have common > > layout for struct utmp and utmpx, corresponding headers are taken > > from s390 port. > > You can't #include installed headers from other ports like this; it > wouldn't work when using an installed library. > > -- > Joseph S. Myers > joseph@codesourcery.com So I should copy? Hmm...
On Tue, 28 Jun 2016, Yury Norov wrote: > > You can't #include installed headers from other ports like this; it > > wouldn't work when using an installed library. > > > > -- > > Joseph S. Myers > > joseph@codesourcery.com > > So I should copy? Hmm... Yes, unless you can develop an additional abstraction to describe the differences between architectures, so that all architectures can share the same bits/utmp.h and bits/utmpx.h and there's only a smaller header that needs copying.
On 28/06/2016 14:59, Yury Norov wrote: > On Tue, Jun 28, 2016 at 05:18:04PM +0000, Joseph Myers wrote: >> On Tue, 28 Jun 2016, Yury Norov wrote: >> >>> aarch64 and ilp32 has different size of time_t. So to have common >>> layout for struct utmp and utmpx, corresponding headers are taken >>> from s390 port. >> >> You can't #include installed headers from other ports like this; it >> wouldn't work when using an installed library. >> >> -- >> Joseph S. Myers >> joseph@codesourcery.com > > So I should copy? Hmm... > In this case yes, since the reference will be broken because the s390 won't be installed.
diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/utmp.h b/sysdeps/unix/sysv/linux/aarch64/bits/utmp.h new file mode 100644 index 0000000..a492a0b --- /dev/null +++ b/sysdeps/unix/sysv/linux/aarch64/bits/utmp.h @@ -0,0 +1 @@ +#include <sysdeps/unix/sysv/linux/s390/bits/utmp.h> diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/utmpx.h b/sysdeps/unix/sysv/linux/aarch64/bits/utmpx.h new file mode 100644 index 0000000..9e890e7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/aarch64/bits/utmpx.h @@ -0,0 +1 @@ +#include <sysdeps/unix/sysv/linux/s390/bits/utmpx.h>
aarch64 and ilp32 has different size of time_t. So to have common layout for struct utmp and utmpx, corresponding headers are taken from s390 port. This is temporary solution. Proper solution shoud come from generic code and also take care on endianness. Signed-off-by: Yury Norov <ynorov@caviumnetworks.com> --- sysdeps/unix/sysv/linux/aarch64/bits/utmp.h | 1 + sysdeps/unix/sysv/linux/aarch64/bits/utmpx.h | 1 + 2 files changed, 2 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/aarch64/bits/utmp.h create mode 100644 sysdeps/unix/sysv/linux/aarch64/bits/utmpx.h