On 6/7/2016 8:56 PM, Deven Lahoti wrote:
> I patched OpenAFS to work on Gentoo Hardened 4.4.8-r1; it just required
> a few changes in struct initializations to work with struct
> randomization. Looking at old messages on the list, the reason these
> weren't changed before was for compatibility with old compilers,

Its not just for "old compilers" but for platforms that do not have full
C99 support such as Windows.  OpenAFS still builds on many platforms and
OS revisions that do not have the necessary support.

It is almost certainly ok to use labeled structure initialization in
platform specific code which is not compiled on all platforms.  In your
changes those to

  src/afs/LINUX/osi_misc.c
  src/afs/LINUX/osi_sysctl.c

since those are platform specific.   It is quite possible that it is ok
for most current versions of UNIX and so

  src/afs/afs_fetchstore.c

is possibly fine.  However, src/rxkad/rxkad_client.c is cross-platform
and is certainly built on platforms without the necessary support.

That isn't to say that you cannot add a patch to change how
initialization is performed but that it would have to be conditional
upon whether or not the compiler has the necessary language support.

Jeffrey Altman




<<attachment: jaltman.vcf>>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to