Making it easier for Vendors to avoid modifying Samba ...

Richard Sharpe realrichardsharpe at
Fri Nov 1 10:07:43 MDT 2013

Hi folks,

Recently we had to deal with an issue relating to utimensat on our
platform. Specifically, to keep robocopy happy you really need
nanosecond time resolution. However, the platform did not have support
for utimensat (and libc and the include files did not have it.)

We found some code that we could back port that gave us the syscall,
but messing with libc was not something we wanted to do, so we
eventually modified some places to call the syscall via __syscall but
that will create extra work for us later when we upgrade because we
have to track this down and fix it when we shift to a platform that
has that syscall available (also, we jammed  ac_cv_func_utimensat=yes
into configure via the command line.)

So, what I wonder is are there better ways to do this? Could Samba
provide a central include file that is reserved for vendors to place
stuff in?

I realize that we could also pass in a #define for utimensat that
defines an inline function that calls __syscall on the configure
command line but that is starting to get ugly.

Richard Sharpe

More information about the samba-technical mailing list