Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: devel

GCRY_THREAD_OPTION_PTHREAD_IMPL

 

 

GnuPG devel RSS feed   Index | Next | Previous | View Threaded


cononet at gmail

Jun 24, 2009, 4:57 AM

Post #1 of 1 (410 views)
Permalink
GCRY_THREAD_OPTION_PTHREAD_IMPL

Hello

This:

#include <gnutls.h>
#include <gcrypt.h>
#include <errno.h>
#include <pthread.h>
GCRY_THREAD_OPTION_PTHREAD_IMPL;

int main()
{
/* The order matters.
*/
gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
gnutls_global_init();
}


Compiles flawlessly on debian 5 64bit..

However, on Cent OS 5 64 bit..
With an identical setup and gcc produces:

[root [at] localhos code]# gcc -lpthread test.cpp -O -lgnutls -lssl -lcurl
-pthread
test.cpp: In function int gcry_pthread_mutex_init(void**):
test.cpp:5: error: malloc was not declared in this scope
test.cpp:5: error: free was not declared in this scope
test.cpp: In function int gcry_pthread_mutex_destroy(void**):
test.cpp:5: error: invalid conversion from void* to pthread_mutex_t*
test.cpp:5: error: initializing argument 1 of int
pthread_mutex_destroy(pthread_mutex_t*)
test.cpp:5: error: free was not declared in this scope
test.cpp: In function int gcry_pthread_mutex_lock(void**):
test.cpp:5: error: invalid conversion from void* to pthread_mutex_t*
test.cpp:5: error: initializing argument 1 of int
pthread_mutex_lock(pthread_mutex_t*)
test.cpp: In function int gcry_pthread_mutex_unlock(void**):
test.cpp:5: error: invalid conversion from void* to pthread_mutex_t*
test.cpp:5: error: initializing argument 1 of int
pthread_mutex_unlock(pthread_mutex_t*)
[root [at] localhos code]#

Might anyone be able to shed any light on what and why,
I need to get this rectified.

Thanks a million,
John

GnuPG devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.