From 384283d2a4fb189688f56710cccdf29aacb75c58 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Thu, 15 Oct 2009 19:43:10 +0200
Subject: [PATCH] find_library('c') return None under Windows

---
 src/gajim.py | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/src/gajim.py b/src/gajim.py
index f0b20d38eb..47628a3a5d 100644
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -158,22 +158,23 @@ else:
 	if dbus_support.supported:
 		from music_track_listener import MusicTrackListener
 		import dbus
-		
+
 	from ctypes import CDLL
 	from ctypes.util import find_library
 	import platform
-	
+
 	sysname = platform.system()
-	libc = CDLL(find_library('c'))
-
-	# The constant defined in <linux/prctl.h> which is used to set the name of
-	# the process.
-	PR_SET_NAME = 15
-	
-	if sysname == 'Linux':
-		libc.prctl(PR_SET_NAME, 'gajim')
-	elif sysname in ('FreeBSD', 'OpenBSD', 'NetBSD'):
-		libc.setproctitle('gajim')
+	if sysname in ('Linux', 'FreeBSD', 'OpenBSD', 'NetBSD'):
+		libc = CDLL(find_library('c'))
+
+		# The constant defined in <linux/prctl.h> which is used to set the name of
+		# the process.
+		PR_SET_NAME = 15
+
+		if sysname == 'Linux':
+			libc.prctl(PR_SET_NAME, 'gajim')
+		elif sysname in ('FreeBSD', 'OpenBSD', 'NetBSD'):
+			libc.setproctitle('gajim')
 
 	if gtk.pygtk_version < (2, 12, 0):
 		pritext = _('Gajim needs PyGTK 2.12 or above')
-- 
GitLab