ports/net/vyqchat/files/patch-src-uuid.cpp
Pav Lucistnik 05facefee1 VyQChat is a real-time, text-based, serverless chat program dedicated to LANs,
that runs on Linux using Qt/X11 library. It is almost 100% compatible with
Vypress Chat(TM) for Windows. It allows you to chat with friends on public or
private channels, send and recieve messages etc. The GUI is meant to be
user-friendly and lets you to do most things with mouse. There is also optional
sound support. VyQChat has been written in C++ and requires Qt library, version
3.x.

PR:		ports/86257
Submitted by:	Victor Semionov <semionov@mail.bg>
2005-09-17 22:40:23 +00:00

22 lines
505 B
C++

--- src/uuid.cpp.orig Mon Jul 18 20:54:08 2005
+++ src/uuid.cpp Sat Sep 17 23:03:48 2005
@@ -12,7 +12,7 @@
#include "uuid.h"
#include <qstring.h>
-#include <openssl/rand.h>
+#include <fcntl.h>
UUID::UUID(): QByteArray(UUID_LEN)/*{{{*/
{
@@ -35,7 +35,9 @@
void UUID::generate()/*{{{*/
{
- RAND_bytes((unsigned char *)data(), UUID_LEN);
+ int rfd = open("/dev/random", O_RDONLY);
+ read(rfd, (void *)data(), UUID_LEN);
+ close(rfd);
}/*}}}*/
void UUID::set(const unsigned char *data)/*{{{*/