193943266c597ad66300445a04afa01270f2b5763Randall Spangler/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
2322536d2f9d30f42218cc9f2ab40574557da8a9Gaurav Shah * Use of this source code is governed by a BSD-style license that can be
3322536d2f9d30f42218cc9f2ab40574557da8a9Gaurav Shah * found in the LICENSE file.
4322536d2f9d30f42218cc9f2ab40574557da8a9Gaurav Shah *
5322536d2f9d30f42218cc9f2ab40574557da8a9Gaurav Shah * Stub implementations of utility functions which call their linux-specific
6322536d2f9d30f42218cc9f2ab40574557da8a9Gaurav Shah * equivalents.
7322536d2f9d30f42218cc9f2ab40574557da8a9Gaurav Shah */
8322536d2f9d30f42218cc9f2ab40574557da8a9Gaurav Shah
90c3ba249abb1dc60f5ebabccf84ff13206440b83Bill Richardson#include <stdint.h>
100c3ba249abb1dc60f5ebabccf84ff13206440b83Bill Richardson
11d6ff721eb077759ac8f672dc15094e65968bc45eBill Richardson#define _STUB_IMPLEMENTATION_
12322536d2f9d30f42218cc9f2ab40574557da8a9Gaurav Shah#include "utility.h"
13322536d2f9d30f42218cc9f2ab40574557da8a9Gaurav Shah
14ed9c96a7aa7f6493c94ef3ab3618e04def4a2b3cGaurav Shah#include <stdarg.h>
15322536d2f9d30f42218cc9f2ab40574557da8a9Gaurav Shah#include <stdio.h>
16322536d2f9d30f42218cc9f2ab40574557da8a9Gaurav Shah#include <stdlib.h>
17f302905224a346718910e56f5f1593d4b19253f1Randall Spangler#include <string.h>
18ad6824ba4fc18c4eba4e98ba2b2e476dfcedbbaeRandall Spangler#include <sys/time.h>
19322536d2f9d30f42218cc9f2ab40574557da8a9Gaurav Shah
2093943266c597ad66300445a04afa01270f2b5763Randall Spanglerint Memcmp(const void *src1, const void *src2, size_t n)
2193943266c597ad66300445a04afa01270f2b5763Randall Spangler{
2293943266c597ad66300445a04afa01270f2b5763Randall Spangler	return memcmp(src1, src2, n);
2337f6b55a25f337f555da1dfbe585d32cd004103dLouis Yung-Chieh Lo}
2437f6b55a25f337f555da1dfbe585d32cd004103dLouis Yung-Chieh Lo
2593943266c597ad66300445a04afa01270f2b5763Randall Spanglervoid *Memcpy(void *dest, const void *src, uint64_t n)
2693943266c597ad66300445a04afa01270f2b5763Randall Spangler{
2793943266c597ad66300445a04afa01270f2b5763Randall Spangler	return memcpy(dest, src, (size_t)n);
28322536d2f9d30f42218cc9f2ab40574557da8a9Gaurav Shah}
2966264b5d9778e7f3e99f4f72e170d2ef6a819a0eStefan Reinauer
3093943266c597ad66300445a04afa01270f2b5763Randall Spanglervoid *Memset(void *d, const uint8_t c, uint64_t n)
3193943266c597ad66300445a04afa01270f2b5763Randall Spangler{
3293943266c597ad66300445a04afa01270f2b5763Randall Spangler	return memset(d, c, n);
3366264b5d9778e7f3e99f4f72e170d2ef6a819a0eStefan Reinauer}
3466264b5d9778e7f3e99f4f72e170d2ef6a819a0eStefan Reinauer
3566264b5d9778e7f3e99f4f72e170d2ef6a819a0eStefan Reinauer
36