summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/bus/Sbus.c
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2004-12-22 08:28:16 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2004-12-22 08:28:16 +0000
commit3035739e5b7d5a9042292d64455feb4b38788fe4 (patch)
tree1dfb6b42ab4a37ff331bed2bb7831e0bc5a76165 /hw/xfree86/os-support/bus/Sbus.c
parentfa0677ab43722462042f87c4636a7d59d1cb873f (diff)
Bug #2123 <https://bugs.freedesktop.org/show_bug.cgi?id=2123> Attachment
#1587 <https://bugs.freedesktop.org/attachment.cgi?id=1587> Call to uname should not check for return == 0, but for >= 0 instead
Diffstat (limited to 'hw/xfree86/os-support/bus/Sbus.c')
-rw-r--r--hw/xfree86/os-support/bus/Sbus.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/xfree86/os-support/bus/Sbus.c b/hw/xfree86/os-support/bus/Sbus.c
index 4be660a75..efe5c4ba6 100644
--- a/hw/xfree86/os-support/bus/Sbus.c
+++ b/hw/xfree86/os-support/bus/Sbus.c
@@ -20,7 +20,7 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Sbus.c,v 1.3 2003/06/10 20:48:01 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bus/Sbus.c,v 1.2tsi Exp $ */
#include <fcntl.h>
#include <stdio.h>
@@ -166,10 +166,12 @@ promIsP1275(void)
#elif defined(sun)
struct utsname buffer;
- if ((uname(&buffer) == 0) && !strcmp(buffer.machine, "sun4u"))
+ if ((uname(&buffer) >= 0) && !strcmp(buffer.machine, "sun4u"))
promP1275 = TRUE;
else
promP1275 = FALSE;
+#elif defined(__FreeBSD__)
+ promP1275 = TRUE;
#else
#error Missing promIsP1275() function for this OS
#endif