Remove dependency on skygw_utils.h
- STRERROR_BUFLEN moved to cdefs.h and renamed to MXS_STRERROR_BUFLEN. Better would be to provide a 'const char* mxs_strerror(int errno)' that would have a thread specific buffer for the error message. - MIN and MAX also moved to defs.h as MXS_MIN and MXS_MAX. - Now only mlist.h of the headers depend upon skygw_utils.h.
This commit is contained in:
@ -11,8 +11,8 @@
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
#include <maxscale/cdefs.h>
|
||||
#include "maxavro.h"
|
||||
#include <maxscale/skygw_utils.h>
|
||||
#include <string.h>
|
||||
#include <maxscale/debug.h>
|
||||
#include <maxscale/log_manager.h>
|
||||
@ -324,7 +324,7 @@ GWBUF* maxavro_record_read_binary(MAXAVRO_FILE *file)
|
||||
{
|
||||
if (ferror(file->file))
|
||||
{
|
||||
char err[STRERROR_BUFLEN];
|
||||
char err[MXS_STRERROR_BUFLEN];
|
||||
MXS_ERROR("Failed to read %ld bytes: %d, %s", data_size, errno,
|
||||
strerror_r(errno, err, sizeof(err)));
|
||||
file->last_error = MAXAVRO_ERR_IO;
|
||||
|
Reference in New Issue
Block a user