Skip to content

Build error with gcc 15 on Fedora 42 #9

Description

@ycollet

I am trying to build rt-test on Fedora 42 with gcc 15.
The build fails with the following error message:

In file included from src/lib/rt-utils.c:28:
src/include/rt-sched.h:45:8: error: redefinition of ‘struct sched_attr’
   45 | struct sched_attr {
      |        ^~~~~~~~~~
In file included from /usr/include/bits/sched.h:63,
                 from /usr/include/sched.h:43,
                 from src/lib/rt-utils.c:14:
/usr/include/linux/sched/types.h:98:8: note: originally defined here
   98 | struct sched_attr {
      |        ^~~~~~~~~~
src/include/rt-sched.h:62:5: error: conflicting types for ‘sched_setattr’; have ‘int(pid_t,  const struct sched_attr *, unsigned int)’ {aka ‘int(int,  const struct sched_attr *, unsigned int)’}
   62 | int sched_setattr(pid_t pid,
      |     ^~~~~~~~~~~~~
/usr/include/bits/sched.h:148:5: note: previous declaration of ‘sched_setattr’ with type ‘int(pid_t,  struct sched_attr *, unsigned int)’ {aka ‘int(int,  struct sched_attr *, unsigned int)’}
  148 | int sched_setattr (pid_t tid, struct sched_attr *attr, unsigned int flags)
      |     ^~~~~~~~~~~~~
src/include/rt-sched.h:66:5: error: conflicting types for ‘sched_getattr’; have ‘int(pid_t,  struct sched_attr *, unsigned int,  unsigned int)’ {aka ‘int(int,  struct sched_attr *, unsigned int,  unsigned int)’}
   66 | int sched_getattr(pid_t pid,
      |     ^~~~~~~~~~~~~
/usr/include/bits/sched.h:153:5: note: previous declaration of ‘sched_getattr’ with type ‘int(pid_t,  struct sched_attr *, unsigned int,  unsigned int)’ {aka ‘int(int,  struct sched_attr *, unsigned int,  unsigned int)’}
  153 | int sched_getattr (pid_t tid, struct sched_attr *attr, unsigned int size,
      |     ^~~~~~~~~~~~~
src/lib/rt-utils.c: In function ‘tracemark’:
src/lib/rt-utils.c:479:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  479 |         write(tracemark_fd, tracebuf, len);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lib/rt-utils.c:482:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  482 |         write(trace_fd, "0\n", 2);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:122: bld/rt-utils.o] Error 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions