Skip to content
Snippets Groups Projects
  1. Aug 09, 2018
  2. Jul 03, 2018
    • Lyude Paul's avatar
      meson: ensure the libc has RPC functions when secure-rpc is enabled · d95a1310
      Lyude Paul authored and Adam Jackson's avatar Adam Jackson committed
      
      Currently our meson.build just makes the assumption that the libc is
      going to provide RPC functions. This doesn't actually seem to be the
      case on Fedora, which causes compilation to fail unexpectedly:
      
      ../../Projects/xserver/os/rpcauth.c:47:10: fatal error: rpc/rpc.h: No such file or directory
       #include <rpc/rpc.h>
                ^~~~~~~~~~~
      compilation terminated.
      
      So, in the event that we can't use libtirpc ensure that we actually
      check whether or not the libc provides rpc/rpc.h. If it doesn't, raise
      an error.
      
      Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      Signed-off-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
      d95a1310
  3. Jun 27, 2018
  4. May 21, 2018
  5. Apr 17, 2018
    • Chris Wilson's avatar
      os/WaitFor: Check timers on every iteration · ac7a4bf4
      Chris Wilson authored and Adam Jackson's avatar Adam Jackson committed
      
      Currently we only check timer expiry if there are no client fd (or
      other input) waiting to be serviced. This makes it very easy to starve
      the timers with long request queues, and so miss critical timestamps.
      
      The timer subsystem is just another input waiting to be serviced, so
      evaluate it on every loop like all the others, at the cost of calling
      GetTimeInMillis() slightly more frequently. (A more invasive and likely
      OS specific alternative would be to move the timer wheel to the local
      equivalent of timerfd, and treat it as an input fd to the event loop
      exactly equivalent to all the others, and so also serviced on every
      pass. The trade-off being that the kernel timer wheel is likely more
      efficiently integrated with epoll, but individual updates to each timer
      would then require syscalls.)
      
      Reviewed-by: default avatarPeter Harris <pharris@opentext.com>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      ac7a4bf4
  6. Apr 02, 2018
    • Thierry Reding's avatar
      meson: Remove usage of pkg-config --variable=includedir · f3b0a2ae
      Thierry Reding authored and Adam Jackson's avatar Adam Jackson committed
      
      Querying a pkg-config variable using the --variable option produces the
      value of the given variable as stored in the pkg-config file and should
      not be used to add directories to the include search path.
      
      The reason for this is that it breaks cross-compilation, because header
      files are installed relative to the host sysroot. pkg-config supports a
      PKG_CONFIG_SYSROOT_DIR environment variable that points to this sysroot
      and will prepend that to the path of directories in -I or -L options in
      pkg-config's Cflags, Libs or Libs.private keywords. However, because no
      context can be inferred from variable names, as opposed to the keywords
      with fixed meaning, the sysroot path will not be prepended to them. The
      build system is responsible for doing so if necessary since it is aware
      of the context in which the variable is used.
      
      Adding the include directory returned by pkg-config to the include path
      leaks build system information into the cross-build and break with very
      confusing errors such as this:
      
      	In file included from include/misc.h:82:0,
      			 from dix/atom.c:55:
      	/usr/include/pthread.h:682:6: warning: '__regparm__' attribute directive ignored [-Wattributes]
      	      __cleanup_fct_attribute;
      	      ^~~~~~~~~~~~~~~~~~~~~~~
      
      or this:
      
      	In file included from include/misc.h:139:0,
      			 from dix/atom.c:55:
      	/usr/include/stdlib.h:133:8: error: '_Float128' is not supported on this target
      	 extern _Float128 strtof128 (const char *__restrict __nptr,
      		^~~~~~~~~
      
      Fix this by replacing the include directory with the appropriate xproto
      dependency required to add the correct include directory to the compile
      command for subdirectories that are missing the dependency. As detailed
      above, this gives pkg-config the opportunity to prepend the sysroot for
      all paths in -I compiler options.
      
      Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      f3b0a2ae
  7. Mar 28, 2018
  8. Mar 21, 2018
  9. Mar 08, 2018
  10. Feb 19, 2018
  11. Jan 31, 2018
  12. Jan 24, 2018
  13. Jan 22, 2018
  14. Jan 16, 2018
  15. Jan 08, 2018
    • Adam Jackson's avatar
      os: Fix a type error in the IPv6 XDMCP code · 652913cd
      Adam Jackson authored
      
      Building with strict-aliasing rightly chirps here:
      
      ../os/xdmcp.c: In function ‘XdmcpRegisterConnection’:
      ../os/xdmcp.c:489:31: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
                           &((struct sockaddr_in6 *) &address)->sin6_addr.s6_addr[12];
                                     ^~~~~~~~~~~~
      
      We have "const char *address", so &address here is a char ** (i.e., it
      points to the slot on the stack containing the pointer to the character
      array passed in as an argument). Casting that to a struct sockaddr_in6 *
      is wrong, because it means that area of the stack will be reinterpreted
      as a struct sockaddr_in6.
      
      Instead, cast address, not &address.
      
      Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      652913cd
  16. Dec 13, 2017
  17. Nov 29, 2017
  18. Nov 06, 2017
  19. Oct 30, 2017
  20. Oct 10, 2017
  21. Aug 30, 2017
    • Adam Jackson's avatar
      os: Fix warning in LockServer · aabf65d2
      Adam Jackson authored
      
      The meson build gives me:
      
      ../os/utils.c: In function ‘LockServer’:
      ../os/utils.c:310:40: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
           snprintf(pid_str, sizeof(pid_str), "%10ld\n", (long) getpid());
                                              ^~~~~~~~~
      ../os/utils.c:310:5: note: ‘snprintf’ output between 12 and 13 bytes into a destination of size 12
           snprintf(pid_str, sizeof(pid_str), "%10ld\n", (long) getpid());
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Which seems to be due to the %d part meaning that a negative number's -
      sign would be one wider than we're expecting. Fine, just coerce it to
      unsigned.
      
      Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      Reviewed-by: default avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      aabf65d2
  22. Aug 22, 2017
  23. Aug 14, 2017
  24. Jun 13, 2017
  25. May 12, 2017
  26. May 10, 2017
  27. May 04, 2017
  28. Apr 29, 2017
Loading