Build Errors

- Added missing includes.
This commit is contained in:
Paul Beckingham 2013-05-12 12:15:15 -04:00
parent 51c339e49f
commit dcc9554da8
5 changed files with 9 additions and 3 deletions

View file

@ -30,12 +30,15 @@
#ifdef HAVE_LIBGNUTLS
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <TLSClient.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <sys/errno.h>
#include <sys/types.h>
#include <netdb.h>
#include <i18n.h>
#define MAX_BUF 1024
@ -102,7 +105,7 @@ void TLSClient::init (const std::string& ca)
if (ret == GNUTLS_E_INVALID_REQUEST)
std::cout << "c: ERROR Priority error at: " << err << "\n";
exit (1);
throw std::string (STRING_TLS_INIT_FAIL);
}
// Apply the x509 credentials to the current session.
@ -113,8 +116,7 @@ void TLSClient::init (const std::string& ca)
void TLSClient::connect (const std::string& host, const std::string& port)
{
// use IPv4 or IPv6, does not matter.
struct addrinfo hints;
memset (&hints, 0, sizeof hints);
struct addrinfo hints = {0};
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE; // use my IP

View file

@ -700,6 +700,7 @@
#define STRING_UDA_COLLISION "The UDA named '{1}' is the same as a core attribute, and is not permitted."
#define STRING_INVALID_MOD "The '{1}' attribute does not allow a value of '{2}'."
#define STRING_INVALID_SORT_COL "The '{1}' column is not a valid sort field."
#define STRING_TLS_INIT_FAIL "Error initializing TLS."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "No tasks."

View file

@ -715,6 +715,7 @@
#define STRING_UDA_COLLISION "El UDA denominado '{1}' es el mismo que un atributo del núcleo, y no está permitido."
#define STRING_INVALID_MOD "El atributo '{1}' no admite un valor '{2}'."
#define STRING_INVALID_SORT_COL "La columna '{1}' no es un campo de ordenación válido."
#define STRING_TLS_INIT_FAIL "Error initializing TLS."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "Ninguna tarea."

View file

@ -700,6 +700,7 @@
#define STRING_UDA_COLLISION "The UDA named '{1}' is the same as a core attribute, and is not permitted."
#define STRING_INVALID_MOD "The '{1}' attribute does not allow a value of '{2}'."
#define STRING_INVALID_SORT_COL "The '{1}' column is not a valid sort field."
#define STRING_TLS_INIT_FAIL "Error initializing TLS."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "No tasks."

View file

@ -701,6 +701,7 @@
#define STRING_UDA_COLLISION "L'UDA '{1}' ha lo stesso nome di un attributo di sistema, e ciò non è permesso."
#define STRING_INVALID_MOD "L'attributo '{1}' non ammette un valore pari a '{2}'."
#define STRING_INVALID_SORT_COL "La colonna '{1}' non è un campo di ordinamento valido."
#define STRING_TLS_INIT_FAIL "Error initializing TLS."
// Feedback
#define STRING_FEEDBACK_NO_TASKS "Nessun task."