Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-13274

Building againt lustreapi using -std=c99

XMLWordPrintable

    • 9223372036854775807

      An application that uses the compiler flag -std=c99 wants to link against lustreapi. This was possible in version 2.8. Current versions of lustreapi use the linux kernel macro __ALIGN_KERNEL() which contains the gnuism typeof, as opposed the ISO version __typeof__. For older kernels that don't define ___ALIGN_KERNEL(), Lustre conditionally defines it.

      The "simplest" fix would be for the application to add -Dtypeof=__typeof__, however, this would require figuring out where in the build system to add such a flag. The other option would be to change Lustre and redefine typeof to __typeof__ in the source code of the files that use __ALIGN_KERNEL() or maybe somewhere in the Lustre build system.

      Are there assumptions about the C version that is used by applications that use lustreapi?

       

       

       

            simmonsja James A Simmons
            defazio Gian-Carlo Defazio
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: