From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wi0-x22f.google.com ([2a00:1450:400c:c05::22f]) by metis.ext.pengutronix.de with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from ) id 1ZTVlo-00084i-KQ for ptxdist@pengutronix.de; Sun, 23 Aug 2015 15:57:12 +0200 Received: by widdq5 with SMTP id dq5so27804248wid.1 for ; Sun, 23 Aug 2015 06:57:07 -0700 (PDT) From: Alexander Aring Date: Sun, 23 Aug 2015 15:56:58 +0200 Message-Id: <1440338218-18404-2-git-send-email-alex.aring@gmail.com> In-Reply-To: <1440338218-18404-1-git-send-email-alex.aring@gmail.com> References: <1440338218-18404-1-git-send-email-alex.aring@gmail.com> Subject: [ptxdist] [PATCH 2/2] genimage: add workaround to work with glibc 2.22 List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Alexander Aring VGhpcyBwYXRjaCBhZGRzIGEgd29ya2Fyb3VuZCBmb3IgY2hlY2sgaWYgdmFsdWUgYXJndW1lbnQg b2Ygc2V0ZW52IGlzCm51bGwuIEluIGFsbCBnbGliYyB2ZXJzaW9ucyBzZXRlbnYoLi4uLCBOVUxM LCAuLi4pIGVuZHMgaW4gYW4gdW5kZWYKYmVoYXZpb3VyLCBzaW5jZSBnbGliYyAyLjIyIGl0IHdp bGwgZW5kIGluIGEgY29yZSBkdW1wLgoKVGhpcyBpcyBhIHdvcmthcm91bmQgYmVjYXVzZSBpdCBh ZGRzIHRvIGV2ZXJ5IHNldGVudiBhIG51bGwgY2hlY2suIEkKdGhpbmsgc29tZSBzZXRlbnYgYXJl IG9wdGlvbmFsIGFuZCBzb21lIG5lZWQgdG8gYmUgc2V0IGxpa2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