Compilation and solving problem on mips-sony-bsd.

NAKAJI Hiroyuki nakaji at
Thu Mar 16 01:29:38 GMT 2000


I'm trying samba-2.0.6 on my Sony NEWS-OS 4.2.1aRD which is based on
4.3BSD, having trouble with compilation. Also I have question and want
be helped to solve the problem.

Yes, I can compile it with dirty hack which is found at

There are some problems about this old and specific system. 

1. It does not have setvbuf().
2. It does not have 'struct utimbuf'.
3. It has 'O_NONBLOCK' in <stream/xti.h>.
4. It does not have 'WNOHANG'.

I don't know why.

The setvbuf() can be replaced with setbuffer() and setlinebuf(), for
example, I wrote

Index: lib/getsmbpass.c
RCS file: /home/nakaji/ncvs/samba-news4/source/lib/getsmbpass.c,v
retrieving revision
diff -u -r1.1.1.1 getsmbpass.c
--- getsmbpass.c        1999/11/08 05:13:42
+++ getsmbpass.c        1999/11/17 00:34:32
@@ -106,7 +106,11 @@
     out = in;
+#if defined(sony_news) && defined(SYSTYPE_BSD)
+  setbuffer(in, NULL, 0);
   setvbuf(in, NULL, _IONBF, 0);
   /* Turn echoing off if it is on now.  */

Of cource, this is dirty because it's very system specific. :)

For the second 'struct utimbuf' problem, I have a question. Why is
HAVE_UTIMBUF not used in any *.c or *.h files? Everywhere, 'struct
utimbuf' is used as if it is STANDARD.

My utime(3) says,

     utime - set file times

     #include <sys/types.h>

     utime(file, timep)
     char *file;
     time_t timep[2];

while in FreeBSD's man page,

     #include <sys/types.h>
     #include <utime.h>

     utime(const char *file, const struct utimbuf *timep)

I think SAMBA should use utime() properly for both old and latest

Next question, how and where can I add '#include <stream/xti.h>'?

Finnally, what is 'WNOHANG'? I defined it to be 1 but I'm not sure.

Thanks in advance.
NAKAJI Hiroyuki

More information about the samba mailing list