Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 11 Jan 2012 06:51:02 +0400
From: Solar Designer <>
To: Alexey Dokuchaev <>
Subject: Re: 1.7.9-jumbo5 fails to build with OMPFLAGS = -fopenmp -msse2

On Wed, Jan 11, 2012 at 08:57:51AM +0700, Alexey Dokuchaev wrote:
> Uhm, yuck.  How about adjusting #include <sys/file.h> instead?  On
> FreeBSD, for user land, it only contains definition of struct xfile (and
> (I don't see that John needs this structure, at least not directly):
> JtR builds fine without it here on Ubuntu as well.  Which systems require
> this header?

It's needed for flock(), at least on Linux.  The reason why JtR built
fine for you on Ubuntu is because it has this #if:

#if defined(LOCK_EX) && OS_FLOCK

When you remove #include <sys/file.h>, LOCK_EX is not defined on Linux,
so this piece is skipped.

In other words, JtR builds fine, but the resulting binary is different
(lacking functionality).

Long term, I think I need to switch to fcntl() locks.  Also,
theoretically it may be more appropriate to define the feature macros
for the entire program globally (use the same feature macros for all
source files), although in practice this might expose even more bugs in
various systems' header files.

However, short term I need a less invasive change.  So I think the
#ifndef __FreeBSD__ will be it.



P.S. The discussion of JtR source code is off-topic for john-users,
being more appropriate for john-dev.  (Your initial posting and
discussion of the FreeBSD port were OK for john-users, but this
portability issue is more of a john-dev topic.)  I think we're done with
it for now, but if there's anything else to discuss as it relates to
possible source code changes, let's move to john-dev.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.